diff --git a/pkgs/development/interpreters/janet/darwin-remove-net-test.patch b/pkgs/development/interpreters/janet/darwin-remove-net-test.patch new file mode 100644 index 000000000000..b2a66d5465ea --- /dev/null +++ b/pkgs/development/interpreters/janet/darwin-remove-net-test.patch @@ -0,0 +1,20 @@ +diff --git a/test/suite0009.janet b/test/suite0009.janet +index 6095bc60..25360d60 100644 +--- a/test/suite0009.janet ++++ b/test/suite0009.janet +@@ -174,15 +174,6 @@ + (defer (:close stream) + (check-matching-names stream))) + +-# Test localname and peername +-(repeat 20 +- (with [s (net/server "127.0.0.1" "8000" names-handler)] +- (defn test-names [] +- (with [conn (net/connect "127.0.0.1" "8000")] +- (check-matching-names conn))) +- (repeat 20 (test-names))) +- (gccollect)) +- + # Create pipe + + (var pipe-counter 0) \ No newline at end of file diff --git a/pkgs/development/interpreters/janet/default.nix b/pkgs/development/interpreters/janet/default.nix index 35631174e260..a6ee3dc61fad 100644 --- a/pkgs/development/interpreters/janet/default.nix +++ b/pkgs/development/interpreters/janet/default.nix @@ -2,25 +2,22 @@ stdenv.mkDerivation rec { pname = "janet"; - version = "1.16.1"; + version = "1.20.0"; src = fetchFromGitHub { owner = "janet-lang"; repo = pname; rev = "v${version}"; - sha256 = "sha256-TzJbHmHIySlf3asQ02HOdehMR+s0KkPifBiaQ4FvFCg="; + sha256 = "sha256-mCeOaTbOQej4Uza9fg+xop77z31SQ3sO09dZK8SVAyU="; }; - # we don't have /usr/bin/env in the sandbox, so substitute for a proper, - # absolute path to janet - postPatch = '' - substituteInPlace jpm \ - --replace '/usr/bin/env janet' $out/bin/janet \ - --replace /usr/local/lib/janet $out/lib \ - --replace /usr/local $out + # This release fails the test suite on darwin, remove when debugged. + # See https://github.com/NixOS/nixpkgs/pull/150618 for discussion. + patches = lib.optionals stdenv.isDarwin ./darwin-remove-net-test.patch; + postPatch = '' substituteInPlace janet.1 \ - --replace /usr/local/lib/janet $out/lib + --replace /usr/local/ $out/ ''; nativeBuildInputs = [ meson ninja ]; @@ -35,5 +32,7 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ andrewchambers peterhoeg ]; platforms = platforms.all; + # Marked as broken when patch is applied, see comment above patch. + broken = stdenv.isDarwin; }; }