|
7 | 7 | { self, nixpkgs }: |
8 | 8 |
|
9 | 9 | let |
| 10 | + inherit (nixpkgs) lib; |
| 11 | + |
10 | 12 | supportedSystems = [ |
11 | 13 | "x86_64-linux" |
12 | 14 | "i686-linux" |
13 | 15 | "aarch64-linux" |
14 | 16 | ]; |
15 | | - forAllSystems = nixpkgs.lib.genAttrs supportedSystems; |
| 17 | + forAllSystems = lib.genAttrs supportedSystems; |
16 | 18 |
|
17 | | - version = nixpkgs.lib.removeSuffix "\n" (builtins.readFile ./version); |
| 19 | + version = lib.removeSuffix "\n" (builtins.readFile ./version); |
18 | 20 | pkgs = nixpkgs.legacyPackages.x86_64-linux; |
19 | 21 |
|
| 22 | + src = lib.fileset.toSource { |
| 23 | + root = ./.; |
| 24 | + fileset = lib.fileset.unions [ |
| 25 | + ./COPYING |
| 26 | + ./Makefile.am |
| 27 | + ./README.md |
| 28 | + ./completions |
| 29 | + ./configure.ac |
| 30 | + ./m4 |
| 31 | + ./patchelf.1 |
| 32 | + ./patchelf.spec.in |
| 33 | + ./src |
| 34 | + ./tests |
| 35 | + ./version |
| 36 | + ]; |
| 37 | + }; |
| 38 | + |
20 | 39 | patchelfFor = |
21 | 40 | pkgs: |
22 | 41 | let |
23 | 42 | # this is only |
24 | 43 | in |
25 | 44 | pkgs.callPackage ./patchelf.nix { |
26 | | - inherit version; |
27 | | - src = self; |
| 45 | + inherit version src; |
28 | 46 | }; |
29 | 47 |
|
30 | 48 | in |
|
38 | 56 | hydraJobs = { |
39 | 57 | tarball = pkgs.releaseTools.sourceTarball rec { |
40 | 58 | name = "patchelf-tarball"; |
41 | | - inherit version; |
| 59 | + inherit version src; |
42 | 60 | versionSuffix = ""; # obsolete |
43 | | - src = self; |
44 | 61 | preAutoconf = "echo ${version} > version"; |
45 | 62 |
|
46 | 63 | # portable configure shouldn't have a shebang pointing to the nix store |
|
81 | 98 | ); |
82 | 99 |
|
83 | 100 | # x86_64-linux seems to be only working clangStdenv at the moment |
84 | | - build-sanitized-clang = nixpkgs.lib.genAttrs [ "x86_64-linux" ] ( |
| 101 | + build-sanitized-clang = lib.genAttrs [ "x86_64-linux" ] ( |
85 | 102 | system: |
86 | 103 | self.hydraJobs.build-sanitized.${system}.override { |
87 | 104 | stdenv = nixpkgs.legacyPackages.${system}.llvmPackages_latest.libcxxStdenv; |
|
119 | 136 | glibc = self.packages.${system}.patchelf; |
120 | 137 | default = self.devShells.${system}.glibc; |
121 | 138 | } |
122 | | - // nixpkgs.lib.optionalAttrs (system != "i686-linux") { |
| 139 | + // lib.optionalAttrs (system != "i686-linux") { |
123 | 140 | musl = self.packages.${system}.patchelf-musl; |
124 | 141 | } |
125 | 142 | ); |
|
145 | 162 | NIX_CFLAGS_COMPILE = "-static"; |
146 | 163 | }); |
147 | 164 | } |
148 | | - // nixpkgs.lib.optionalAttrs (system != "i686-linux") { |
| 165 | + // lib.optionalAttrs (system != "i686-linux") { |
149 | 166 | patchelf-musl = patchelfFor nixpkgs.legacyPackages.${system}.pkgsMusl; |
150 | 167 | } |
151 | 168 | ); |
|
0 commit comments