Index: default.nix ================================================================== --- default.nix +++ default.nix @@ -1,2 +1,2 @@ with import {}; -callPackage ./libk.nix {} +callPackage ./dist/libk.nix {} ADDED dist/libk.nix Index: dist/libk.nix ================================================================== --- dist/libk.nix +++ dist/libk.nix @@ -0,0 +1,35 @@ +{stdenv, m4, yasm}: + +stdenv.mkDerivation { + name = "libk"; + version = "0.0.0"; + + src = stdenv.lib.cleanSource ./.; + + nativeBuildInputs = [ m4 yasm ]; + + buildPhase = '' + substituteInPlace global/build-id.sh --replace "/usr/bin/env sh" "${stdenv.shell}" + substituteInPlace global/build-manpage.sh --replace "/usr/bin/env sh" "${stdenv.shell}" + env os=lin arch=x86 bits=64 to=$prefix debug=yes \ + bash build.sh + ''; + + # No proper install yet... + dontInstall = true; + + # This doesn't seem to work anyways? + dontStrip = true; + dontPatchELF = true; + + hardeningDisable = [ "stackprotector" ]; + + meta = with stdenv.lib; { + description = "A modern replacement for libc"; + homepage = https://c.hale.su/lexi/libk; + changelog = "https://c.hale.su/lexi/libk/timeline"; + license = licenses.agpl3; + # Doesn't actually match w/ supported platforms, but... + platforms = platforms.unix; + }; +} DELETED libk.nix Index: libk.nix ================================================================== --- libk.nix +++ libk.nix @@ -1,35 +0,0 @@ -{stdenv, m4, yasm}: - -stdenv.mkDerivation { - name = "libk"; - version = "0.0.0"; - - src = stdenv.lib.cleanSource ./.; - - nativeBuildInputs = [ m4 yasm ]; - - buildPhase = '' - substituteInPlace global/build-id.sh --replace "/usr/bin/env sh" "${stdenv.shell}" - substituteInPlace global/build-manpage.sh --replace "/usr/bin/env sh" "${stdenv.shell}" - env os=lin arch=x86 bits=64 to=$prefix debug=yes \ - bash build.sh - ''; - - # No proper install yet... - dontInstall = true; - - # This doesn't seem to work anyways? - dontStrip = true; - dontPatchELF = true; - - hardeningDisable = [ "stackprotector" ]; - - meta = with stdenv.lib; { - description = "A modern replacement for libc"; - homepage = https://c.hale.su/lexi/libk; - changelog = "https://c.hale.su/lexi/libk/timeline"; - license = licenses.agpl3; - # Doesn't actually match w/ supported platforms, but... - platforms = platforms.unix; - }; -}