Closed TanvirOnGH closed 1 month ago
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 { };
}
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;
+ };
- }
+ })
hey @Sigmanificient, I've followed your advice and opened a pull request: #336909
Project description
A blazing fast and simple compositor for X11.
Metadata