diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2021-12-23 05:36:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 05:36:39 +0000 |
commit | bdb09e90f75406068b061a69a3bde3878e5287fa (patch) | |
tree | f055bda1ad39b2d1785858bbea85aa48bc589a71 | |
parent | 3d0a58ba10f925a7af7d348b270be378e5167c69 (diff) | |
parent | 15a12d81f08c05cfd0e98dc82445a28a52cce010 (diff) | |
download | patchelf-bdb09e90f75406068b061a69a3bde3878e5287fa.tar.gz |
Merge pull request #362 from fzakaria/faridzakaria/musl-flake
Add support to build with musl
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | flake.nix | 23 |
2 files changed, 27 insertions, 4 deletions
@@ -70,6 +70,7 @@ libraries. In particular, it can do the following: ## Compiling and Testing +### Via Autotools ```console ./bootstrap.sh ./configure @@ -77,6 +78,13 @@ make make check sudo make install ``` +### Via Nix + +You can build with Nix in several ways. + +1. Building via `nix build` will produce the result in `./result/bin/patchelf`. If you would like to build _patchelf_ with _musl_ try `nix build .#patchelf-musl` + +2. You can launch a development environment with `nix develop` and folllow the autotools steps above. If you would like to develop with _musl_ try `nix develop .#musl` ## Author @@ -21,6 +21,10 @@ { overlay = final: prev: { + patchelf-new-musl = final.pkgsMusl.callPackage ./patchelf.nix { + inherit version; + src = self; + }; patchelf-new = final.callPackage ./patchelf.nix { inherit version; src = self; @@ -85,12 +89,23 @@ build = self.hydraJobs.build.${system}; }); + devShell = forAllSystems (system: self.devShells.${system}.glibc); + + devShells = forAllSystems (system: + { + glibc = self.packages.${system}.patchelf; + musl = self.packages.${system}.patchelf-musl; + }); + defaultPackage = forAllSystems (system: - (import nixpkgs { - inherit system; - overlays = [ self.overlay ]; - }).patchelf-new + self.packages.${system}.patchelf ); + packages = forAllSystems (system: + { + patchelf = nixpkgsFor.${system}.patchelf-new; + patchelf-musl = nixpkgsFor.${system}.patchelf-new-musl; + }); + }; } |