diff --git a/nix/default.nix b/nix/default.nix index 7891159a3..f90b8185e 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -2,8 +2,6 @@ let deps = import ./deps.nix { inherit pkgs; }; - nimSrc = pkgs.callPackage ./nim.nix {}; - nimbleSrc = pkgs.callPackage ./nimble.nix {}; # nat_traversal is excluded from the static pathArgs; it is handled # separately in buildPhase (its bundled C libs must be compiled first). @@ -62,8 +60,6 @@ pkgs.stdenv.mkDerivation { ${pathArgs} \ --path:$NAT_TRAV \ --path:$NAT_TRAV/src \ - --lib:${nimSrc}/lib \ - --nimblePath:${nimbleSrc} \ --passL:"-L${zerokitRln}/lib -lrln" \ --define:disable_libbacktrace \ --out:build/liblogosdelivery.${libExt} \ @@ -83,8 +79,6 @@ pkgs.stdenv.mkDerivation { ${pathArgs} \ --path:$NAT_TRAV \ --path:$NAT_TRAV/src \ - --lib:${nimSrc}/lib \ - --nimblePath:${nimbleSrc} \ --passL:"-L${zerokitRln}/lib -lrln" \ --define:disable_libbacktrace \ --out:build/liblogosdelivery.a \ diff --git a/nix/nim.nix b/nix/nim.nix deleted file mode 100644 index 4bed28f4c..000000000 --- a/nix/nim.nix +++ /dev/null @@ -1,19 +0,0 @@ -# Fetches the Nim source tree at the exact revision declared in waku.nimble. -# The compiler binary is still pkgs.nim-2_2 (pre-built); this source is -# used to pin the stdlib to the same commit. -# Regenerate sha256 with: -# nix shell nixpkgs#nix-prefetch-git --command \ -# nix-prefetch-git --url https://github.com/nim-lang/Nim.git --rev v --fetch-submodules -{ pkgs }: -let - lines = pkgs.lib.splitString "\n" (builtins.readFile ../waku.nimble); - versionLine = builtins.head (builtins.filter - (l: builtins.match "^const NimVersion.*" l != null) lines); - version = builtins.head (builtins.match ".*\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*" versionLine); -in -pkgs.fetchgit { - url = "https://github.com/nim-lang/Nim.git"; - rev = "v${version}"; - sha256 = "1g4nxbwbc6h174gbpa3gcs47xwk6scbmiqlp0nq1ig3af8fcqcnj"; - fetchSubmodules = true; -} diff --git a/nix/nimble.nix b/nix/nimble.nix deleted file mode 100644 index 0e2bcf8ac..000000000 --- a/nix/nimble.nix +++ /dev/null @@ -1,17 +0,0 @@ -# Fetches Nimble at the exact revision declared in waku.nimble. -# Regenerate hash with: -# nix store prefetch-file --hash-type sha256 --unpack \ -# https://github.com/nim-lang/nimble/archive/v.tar.gz -# or set hash = "" and let Nix report the correct value. -{ pkgs }: -let - lines = pkgs.lib.splitString "\n" (builtins.readFile ../waku.nimble); - versionLine = builtins.head (builtins.filter - (l: builtins.match "^const NimbleVersion.*" l != null) lines); - version = builtins.head (builtins.match ".*\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*" versionLine); -in -pkgs.fetchgit { - url = "https://github.com/nim-lang/nimble"; - rev = "v${version}"; - hash = "sha256-wgzFhModFkwB8st8F5vSkua7dITGGC2cjoDvgkRVZMs="; -} diff --git a/nix/shell.nix b/nix/shell.nix index 3b83ac93d..80e3b7930 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -14,6 +14,7 @@ pkgs.mkShell { rustup rustc cmake - nim-unwrapped-2_2 + nim-2_2 + nimble ]; }