Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: fastcompmgr #336772

Closed
Tanvir1337x opened this issue Aug 23, 2024 · 4 comments
Closed

Package request: fastcompmgr #336772

Tanvir1337x opened this issue Aug 23, 2024 · 4 comments
Labels
0.kind: packaging request Request for a new package to be added

Comments

@Tanvir1337x
Copy link
Contributor

Project description

A blazing fast and simple compositor for X11.

Metadata

@Tanvir1337x Tanvir1337x added the 0.kind: packaging request Request for a new package to be added label Aug 23, 2024
@camerondugan
Copy link
Contributor

Hey, I was able to get it to build with this config, I'm a complete newbie so guidance is greatly appreciated.

fastcompmgr.nix

{ 
  stdenv,
  fetchFromGitHub,
  xorg,
  pkgs,
}:
stdenv.mkDerivation {
  pname = "fastcompmgr";
  version = "0.3";
  src = fetchFromGitHub {
    owner  = "tycho-kirchner";
    repo = "fastcompmgr";
    rev = "v0.3";
    sha256 = "sha256-UKX0gjhbbXSXfyw/NGA31vTOfgd4kdnxO7lIs+mkgFs=";
  };

  nativeBuildInputs = [ pkgs.pkg-config ];

  buildInputs = [ 
    xorg.libX11
    xorg.libXcomposite
    xorg.libXdamage
    xorg.libXfixes
    xorg.libXrender
  ];

  installPhase = ''
    runHook preInstall
    mkdir -p $out/bin
    cp fastcompmgr $out/bin
    runHook postInstall
  '';
}

and in my default.nix:

let
  nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
  pkgs = import nixpkgs { config = {}; overlays = []; };
in
{
  fastcompmgr = pkgs.callPackage ./fastcompmgr.nix { };
}

@Sigmanificient
Copy link
Member

Sigmanificient commented Aug 24, 2024

Hi @camerondugan, you will need to add a meta attribute set at the end of your package with the description, homepage, license and maintainers key. For this, you might need to add yourself in maintainer list.

Your pull request should have 2 commits:

maintainers: add https://github.com/camerondugan
fastcompmgr: init at 0.3

You should add the package code in pkgs/by-name/fa/fastcompmgr/package.nix.
It should build via nix-build -A fastcompmgr command.

Make sure it is also formatted with nixfmt-rfc-style.

You might also want to change a few things, so here is a diff: (LICENSE_NAME & YOU has to be set)

  { 
    stdenv,
    fetchFromGitHub,
    xorg,
    pkgs,
  }:
- stdenv.mkDerivation {
+ stdenv.mkDerivation (finalAttrs: {
    pname = "fastcompmgr";
    version = "0.3";
+ 
    src = fetchFromGitHub {
      owner  = "tycho-kirchner";
      repo = "fastcompmgr";
-     rev = "v0.3";
+     rev = "refs/tags/v${finalAttrs.version}";
-     sha256 = "sha256-UKX0gjhbbXSXfyw/NGA31vTOfgd4kdnxO7lIs+mkgFs=";
+     hash = "sha256-UKX0gjhbbXSXfyw/NGA31vTOfgd4kdnxO7lIs+mkgFs=";
    };

    nativeBuildInputs = [ pkgs.pkg-config ];

    buildInputs = [ 
      xorg.libX11
      xorg.libXcomposite
      xorg.libXdamage
      xorg.libXfixes
      xorg.libXrender
    ];

    installPhase = ''
      runHook preInstall
+ 
      mkdir -p $out/bin
      cp fastcompmgr $out/bin
+ 
      runHook postInstall
    '';
+
+   meta = {
+    description = "Fast compositor for X11";
+    homepage = "https://github.com/tycho-kirchner/fastcompmgr";
+    license = lib.licenses.LICENSE_NAME
+    maintainers = with lib.maintainers; [ YOU ];
+    platforms = lib.platforms.linux;
+   };
-  }
+ })

@camerondugan
Copy link
Contributor

hey @Sigmanificient, I've followed your advice and opened a pull request: #336909

@gepbird
Copy link
Contributor

gepbird commented Oct 4, 2024

Fixed by #336909

@gepbird gepbird closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

No branches or pull requests

4 participants