Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,42 @@
{ self, nixpkgs }:

let
inherit (nixpkgs) lib;

supportedSystems = [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
forAllSystems = lib.genAttrs supportedSystems;

version = nixpkgs.lib.removeSuffix "\n" (builtins.readFile ./version);
version = lib.removeSuffix "\n" (builtins.readFile ./version);
pkgs = nixpkgs.legacyPackages.x86_64-linux;

src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./COPYING
./Makefile.am
./README.md
./completions
./configure.ac
./m4
./patchelf.1
./patchelf.spec.in
./src
./tests
./version
];
};

patchelfFor =
pkgs:
let
# this is only
in
pkgs.callPackage ./patchelf.nix {
inherit version;
src = self;
inherit version src;
};

in
Expand All @@ -38,9 +56,8 @@
hydraJobs = {
tarball = pkgs.releaseTools.sourceTarball rec {
name = "patchelf-tarball";
inherit version;
inherit version src;
versionSuffix = ""; # obsolete
src = self;
preAutoconf = "echo ${version} > version";

# portable configure shouldn't have a shebang pointing to the nix store
Expand Down Expand Up @@ -81,7 +98,7 @@
);

# x86_64-linux seems to be only working clangStdenv at the moment
build-sanitized-clang = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (
build-sanitized-clang = lib.genAttrs [ "x86_64-linux" ] (
system:
self.hydraJobs.build-sanitized.${system}.override {
stdenv = nixpkgs.legacyPackages.${system}.llvmPackages_latest.libcxxStdenv;
Expand Down Expand Up @@ -119,7 +136,7 @@
glibc = self.packages.${system}.patchelf;
default = self.devShells.${system}.glibc;
}
// nixpkgs.lib.optionalAttrs (system != "i686-linux") {
// lib.optionalAttrs (system != "i686-linux") {
musl = self.packages.${system}.patchelf-musl;
}
);
Expand All @@ -145,7 +162,7 @@
NIX_CFLAGS_COMPILE = "-static";
});
}
// nixpkgs.lib.optionalAttrs (system != "i686-linux") {
// lib.optionalAttrs (system != "i686-linux") {
patchelf-musl = patchelfFor nixpkgs.legacyPackages.${system}.pkgsMusl;
}
);
Expand Down
Loading