Skip to content

Commit 50d4335

Browse files
committed
Add support to build with musl
Add support to the flake.nix to build with musl ``` nix build .#patchelf-musl ```
1 parent c172ce6 commit 50d4335

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ Makefile
3636
.direnv/
3737
.vscode/
3838
.idea/
39+
result

flake.nix

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
{
2323
overlay = final: prev: {
24+
patchelf-new-musl = final.pkgsMusl.callPackage ./patchelf.nix {
25+
inherit version;
26+
src = self;
27+
};
2428
patchelf-new = final.callPackage ./patchelf.nix {
2529
inherit version;
2630
src = self;
@@ -85,12 +89,19 @@
8589
build = self.hydraJobs.build.${system};
8690
});
8791

92+
devShell = forAllSystems (system: pkgs.mkShell {
93+
buildInputs = [ self.defaultPackage.${system}.inputDerivation];
94+
});
95+
8896
defaultPackage = forAllSystems (system:
89-
(import nixpkgs {
90-
inherit system;
91-
overlays = [ self.overlay ];
92-
}).patchelf-new
97+
self.packages.${system}.patchelf
9398
);
9499

100+
packages = forAllSystems (system:
101+
{
102+
patchelf = nixpkgsFor.${system}.patchelf-new;
103+
patchelf-musl = nixpkgsFor.${system}.patchelf-new-musl;
104+
});
105+
95106
};
96107
}

0 commit comments

Comments
 (0)