diff options
author | Domen Kožar <domen@dev.si> | 2020-06-03 17:21:46 (GMT) |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2020-06-16 08:23:02 (GMT) |
commit | 452bb8573d6d1883ac4e132032a4a0a243c2ae59 (patch) | |
tree | 55769bbd7ed24f9cf2f3aac84b56a74a6f174dc0 /release.nix | |
parent | 7013e59d5ae974006c088663559613bf23a66414 (diff) | |
download | patchelf-452bb8573d6d1883ac4e132032a4a0a243c2ae59.zip patchelf-452bb8573d6d1883ac4e132032a4a0a243c2ae59.tar.gz patchelf-452bb8573d6d1883ac4e132032a4a0a243c2ae59.tar.bz2 |
run CI with musl as well
Diffstat (limited to 'release.nix')
-rw-r--r-- | release.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/release.nix b/release.nix index 06bf91d..c9763ef 100644 --- a/release.nix +++ b/release.nix @@ -1,13 +1,21 @@ { patchelfSrc ? { outPath = ./.; revCount = 1234; shortRev = "abcdef"; } -, nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-20.03.tar.gz +, nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz , officialRelease ? false +, isMusl ? false +, systems ? [ "x86_64-linux" "i686-linux" "aarch64-linux" ] }: let - pkgs = import nixpkgs { system = builtins.currentSystem or "x86_64-linux"; }; - + loadPkgs = system: + let + pkgsInit = import nixpkgs { inherit system; }; + in if isMusl + then pkgsInit.pkgsMusl + else pkgsInit; + pkgs = loadPkgs (builtins.currentSystem or "x86_64-linux"); + jobs = rec { @@ -39,9 +47,9 @@ let }; - build = pkgs.lib.genAttrs [ "x86_64-linux" "i686-linux" "aarch64-linux" /* "x86_64-freebsd" "i686-freebsd" "x86_64-darwin" "i686-solaris" "i686-cygwin" */ ] (system: + build = pkgs.lib.genAttrs systems (system: - with import nixpkgs { inherit system; }; + with (loadPkgs system); releaseTools.nixBuild { name = "patchelf"; @@ -67,7 +75,7 @@ let constituents = [ tarball build.x86_64-linux - build.i686-linux + (build.i686-linux or null) /* rpm_fedora27x86_64 deb_debian9i386 @@ -88,7 +96,7 @@ let makeRPM = system: diskImageFun: - with import nixpkgs { inherit system; }; + with (loadPkgs system); releaseTools.rpmBuild rec { name = "patchelf-rpm"; @@ -104,7 +112,7 @@ let makeDeb = system: diskImageFun: - with import nixpkgs { inherit system; }; + with (loadPkgs system); releaseTools.debBuild { name = "patchelf-deb"; |