diff --git a/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch b/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch index 068d7c09b686..10f812e3814a 100644 --- a/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch +++ b/pkgs/development/compilers/factor-lang/adjust-paths-in-unit-tests.patch @@ -8,17 +8,17 @@ Subject: [PATCH] adjust unit test for finding executables in path for NixOS 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/io/standard-paths/unix/unix-tests.factor b/basis/io/standard-paths/unix/unix-tests.factor -index 986c0564d2..f0772fdcc9 100644 +index acd5029..870537f 100644 --- a/basis/io/standard-paths/unix/unix-tests.factor +++ b/basis/io/standard-paths/unix/unix-tests.factor -@@ -5,12 +5,12 @@ sequences tools.test ; - +@@ -5,13 +5,13 @@ sequences tools.test ; + { f } [ "" find-in-path ] unit-test { t } [ - "ls" find-in-path { "/bin/ls" "/usr/bin/ls" } member? + "ls" find-in-path not not ] unit-test - + { t } [ "/sbin:" "PATH" os-env append "PATH" [ "ps" find-in-path @@ -26,6 +26,3 @@ index 986c0564d2..f0772fdcc9 100644 + not not ] with-os-env ] unit-test --- -2.19.2 - diff --git a/pkgs/development/compilers/factor-lang/factor98.nix b/pkgs/development/compilers/factor-lang/factor99.nix similarity index 92% rename from pkgs/development/compilers/factor-lang/factor98.nix rename to pkgs/development/compilers/factor-lang/factor99.nix index 104290684a50..5d60f1d51568 100644 --- a/pkgs/development/compilers/factor-lang/factor98.nix +++ b/pkgs/development/compilers/factor-lang/factor99.nix @@ -83,8 +83,8 @@ let ${wrapFactorScript { from = "./factor"; inherit runtimeLibs; }} ln -sf factor.image .factor-wrapped.image ''; - rev = "7999e72aecc3c5bc4019d43dc4697f49678cc3b4"; - version = "0.98"; + rev = "e10b64dbc53a8583098e73580a1eb9ff4ce0c709"; + version = "0.99"; in stdenv.mkDerivation { @@ -93,12 +93,12 @@ stdenv.mkDerivation { src = fetchurl { url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip"; - sha256 = "01ip9mbnar4sv60d2wcwfz62qaamdvbykxw3gbhzqa25z36vi3ri"; + sha256 = "f5626bb3119bd77de9ac3392fdbe188bffc26557fab3ea34f7ca21e372a8443e"; }; patches = [ - ./staging-command-line-0.98-pre.patch - ./workdir-0.98-pre.patch + ./staging-command-line-0.99-pre.patch + ./workdir-0.99-pre.patch ./adjust-paths-in-unit-tests.patch ]; @@ -150,11 +150,6 @@ stdenv.mkDerivation { done)> $out/lib/factor/ld.so.cache make -j$NIX_BUILD_CORES linux-x86-64 - printf "First build from upstream boot image\n" >&2 - ./build.sh bootstrap - printf "Rebuild boot image\n" >&2 - ./factor -script -e='"unix-x86.64" USING: system bootstrap.image memory ; make-image save 0 exit' - printf "Second build from local boot image\n" >&2 ./build.sh bootstrap runHook postBuild ''; @@ -219,6 +214,5 @@ stdenv.mkDerivation { license = licenses.bsd2; maintainers = with maintainers; [ vrthra spacefrogg ]; platforms = lib.intersectLists platforms.x86_64 platforms.linux; - mainProgram = "factor"; }; } diff --git a/pkgs/development/compilers/factor-lang/scope.nix b/pkgs/development/compilers/factor-lang/scope.nix index 02f0f8896341..af0d7af1293f 100644 --- a/pkgs/development/compilers/factor-lang/scope.nix +++ b/pkgs/development/compilers/factor-lang/scope.nix @@ -5,7 +5,7 @@ let inside = (self: let callPackage = pkgs.newScope self; in rec { - interpreter = callPackage ./factor98.nix { inherit (pkgs) stdenv; }; + interpreter = callPackage ./factor99.nix { inherit (pkgs) stdenv; }; # Convenience access for using the returned attribute the same way as the # interpreter derivation. Takes a list of runtime libraries as its only diff --git a/pkgs/development/compilers/factor-lang/staging-command-line-0.98-pre.patch b/pkgs/development/compilers/factor-lang/staging-command-line-0.99-pre.patch similarity index 76% rename from pkgs/development/compilers/factor-lang/staging-command-line-0.98-pre.patch rename to pkgs/development/compilers/factor-lang/staging-command-line-0.99-pre.patch index 57fc657ddcf3..a9631664a35d 100644 --- a/pkgs/development/compilers/factor-lang/staging-command-line-0.98-pre.patch +++ b/pkgs/development/compilers/factor-lang/staging-command-line-0.99-pre.patch @@ -1,10 +1,10 @@ diff --git a/basis/tools/deploy/backend/backend.factor b/basis/tools/deploy/backend/backend.factor -index ec86089dbe..b146168ec9 100644 +index cfcca0d..87a2b01 100644 --- a/basis/tools/deploy/backend/backend.factor +++ b/basis/tools/deploy/backend/backend.factor -@@ -69,7 +69,7 @@ ERROR: can't-deploy-library-file library ; +@@ -72,7 +72,7 @@ ERROR: can't-deploy-library-file library ; [ staging-image-name "-output-image=" prepend , ] - [ " " join "-include=" prepend , ] bi + [ join-words "-include=" prepend , ] bi ] [ - input-image-name "-i=" prepend , + input-image-name resource-path "-i=" prepend , diff --git a/pkgs/development/compilers/factor-lang/workdir-0.98-pre.patch b/pkgs/development/compilers/factor-lang/workdir-0.98-pre.patch deleted file mode 100644 index f1498743dd67..000000000000 --- a/pkgs/development/compilers/factor-lang/workdir-0.98-pre.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor -index 2d382e49d1..d4d9228d6c 100644 ---- a/core/io/pathnames/pathnames.factor -+++ b/core/io/pathnames/pathnames.factor -@@ -144,7 +144,10 @@ GENERIC: vocab-path ( path -- newpath ) - GENERIC: absolute-path ( path -- path' ) - - M: string absolute-path -- "resource:" ?head [ -+ "resource:work" ?head [ -+ trim-head-separators "/var/lib/factor" prepend-path -+ absolute-path ] -+ [ "resource:" ?head [ - trim-head-separators resource-path - absolute-path - ] [ -@@ -158,6 +161,7 @@ M: string absolute-path - ] [ - current-directory get prepend-path - ] if ] if -+ ] if - ] if ; - - M: object normalize-path ( path -- path' ) diff --git a/pkgs/development/compilers/factor-lang/workdir-0.99-pre.patch b/pkgs/development/compilers/factor-lang/workdir-0.99-pre.patch new file mode 100644 index 000000000000..f1e7a5920627 --- /dev/null +++ b/pkgs/development/compilers/factor-lang/workdir-0.99-pre.patch @@ -0,0 +1,13 @@ +diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor +index a172fe4..40858bc 100644 +--- a/core/io/pathnames/pathnames.factor ++++ b/core/io/pathnames/pathnames.factor +@@ -166,6 +166,8 @@ GENERIC: absolute-path ( path -- path' ) + + M: string absolute-path + { ++ { [ "resource:work" ?head ] ++ [ trim-head-separators "/var/lib/factor" prepend-path absolute-path ] } + { [ "resource:" ?head ] [ trim-head-separators resource-path absolute-path ] } + { [ "vocab:" ?head ] [ trim-head-separators vocab-path absolute-path ] } + { [ "~" ?head ] [ trim-head-separators home prepend-path absolute-path ] }