diff options
author | Will Dietz <w@wdtz.org> | 2018-01-02 20:12:18 -0600 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-02-13 09:44:34 -0600 |
commit | af6b756d984b4af3de046924d44c01da43c9a3b6 (patch) | |
tree | 7ef8e3f1f850599a6ce2fc19c855f8c6b69e7d0d /pkgs/os-specific/linux/musl | |
parent | 1d538d51c3bc4bf0587c012d9e9ef58311edfe0d (diff) |
muslCross: init
Diffstat (limited to 'pkgs/os-specific/linux/musl')
-rw-r--r-- | pkgs/os-specific/linux/musl/default.nix | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/os-specific/linux/musl/default.nix b/pkgs/os-specific/linux/musl/default.nix index bfc7b717bf7c8..9a97b4259b24e 100644 --- a/pkgs/os-specific/linux/musl/default.nix +++ b/pkgs/os-specific/linux/musl/default.nix @@ -1,5 +1,8 @@ -{ stdenv, fetchurl, linuxHeaders, useBSDCompatHeaders ? true }: - +{ stdenv, lib, fetchurl +, buildPackages +, linuxHeaders ? null +, useBSDCompatHeaders ? true +}: let cdefs_h = fetchurl { url = "http://git.alpinelinux.org/cgit/aports/plain/main/libc-dev/sys-cdefs.h"; @@ -13,13 +16,14 @@ let url = "http://git.alpinelinux.org/cgit/aports/plain/main/libc-dev/sys-tree.h"; sha256 = "14igk6k00bnpfw660qhswagyhvr0gfqg4q55dxvaaq7ikfkrir71"; }; + in stdenv.mkDerivation rec { name = "musl-${version}"; version = "1.1.18"; src = fetchurl { - url = "http://www.musl-libc.org/releases/${name}.tar.gz"; + url = "http://www.musl-libc.org/releases/musl-${version}.tar.gz"; sha256 = "0651lnj5spckqjf83nz116s8qhhydgqdy3rkl4icbh5f05fyw5yh"; }; @@ -56,7 +60,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin # Create 'ldd' symlink, builtin ln -s $out/lib/libc.so $out/bin/ldd - '' + stdenv.lib.optionalString useBSDCompatHeaders '' + '' + lib.optionalString useBSDCompatHeaders '' install -D ${queue_h} $dev/include/sys/queue.h install -D ${cdefs_h} $dev/include/sys/cdefs.h install -D ${tree_h} $dev/include/sys/tree.h @@ -67,8 +71,8 @@ stdenv.mkDerivation rec { meta = { description = "An efficient, small, quality libc implementation"; homepage = "http://www.musl-libc.org"; - license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = [ lib.maintainers.thoughtpolice ]; }; } |