1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

Merge pull request #1110 from colonelpanic8/nix_flake

This commit is contained in:
Yuxuan Shui 2023-12-16 21:25:40 +00:00 committed by GitHub
commit 40d5f42f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 114 additions and 0 deletions

80
flake.lock Normal file
View file

@ -0,0 +1,80 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-ignore-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"ref": "master",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1691186842,
"narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=",
"path": "/nix/store/d42v5grfq77vr10r336kks0qjp0wij8d-source",
"rev": "18036c0be90f4e308ae3ebcab0e14aae0336fe42",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"git-ignore-nix": "git-ignore-nix",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

34
flake.nix Normal file
View file

@ -0,0 +1,34 @@
{
inputs = {
flake-utils.url = github:numtide/flake-utils;
git-ignore-nix = {
url = github:hercules-ci/gitignore.nix/master;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self, flake-utils, nixpkgs, git-ignore-nix, ...
}: flake-utils.lib.eachDefaultSystem (system: let
overlay = self: super: {
picom = super.picom.overrideAttrs (oldAttrs: rec {
pname = "picom";
buildInputs = [
self.pcre2 self.xorg.xcbutil
] ++ self.lib.remove self.xorg.libXinerama (
self.lib.remove self.pcre oldAttrs.buildInputs
);
src = git-ignore-nix.lib.gitignoreSource ./.;
});
};
pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; };
overlays = [ overlay ];
in rec {
inherit overlay overlays;
defaultPackage = pkgs.picom;
devShell = defaultPackage.overrideAttrs {
buildInputs = defaultPackage.buildInputs ++ [
pkgs.clang-tools
];
};
});
}