mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-04-14 20:23:08 +00:00
adapt nim.nix and nimble.nix to two previous commits
This commit is contained in:
parent
8bfbe4f48f
commit
f72437c573
14
nix/nim.nix
14
nix/nim.nix
@ -1,17 +1,19 @@
|
||||
# Fetches the Nim source tree at the exact revision pinned in nimble.lock.
|
||||
# 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 <url> --rev <vcsRevision> --fetch-submodules
|
||||
# nix-prefetch-git --url https://github.com/nim-lang/Nim.git --rev v<version> --fetch-submodules
|
||||
{ pkgs }:
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ../nimble.lock);
|
||||
entry = lock.packages.nim;
|
||||
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 = entry.url;
|
||||
rev = "v${entry.version}";
|
||||
url = "https://github.com/nim-lang/Nim.git";
|
||||
rev = "v${version}";
|
||||
sha256 = "1g4nxbwbc6h174gbpa3gcs47xwk6scbmiqlp0nq1ig3af8fcqcnj";
|
||||
fetchSubmodules = true;
|
||||
}
|
||||
|
||||
@ -1,15 +1,17 @@
|
||||
# Fetches Nimble at the exact revision pinned in nimble.lock.
|
||||
# Fetches Nimble at the exact revision declared in waku.nimble.
|
||||
# Regenerate sha256 with:
|
||||
# nix shell nixpkgs#nix-prefetch-git --command \
|
||||
# nix-prefetch-git --url <url> --rev <vcsRevision> --fetch-submodules
|
||||
# nix-prefetch-git --url https://github.com/nim-lang/nimble --rev v<version> --fetch-submodules
|
||||
{ pkgs }:
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ../nimble.lock);
|
||||
entry = lock.packages.nimble;
|
||||
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 = entry.url;
|
||||
rev = "v${entry.version}";
|
||||
url = "https://github.com/nim-lang/nimble";
|
||||
rev = "v${version}";
|
||||
sha256 = "18cwsjwcgjmnm42kr310hfbw06lym3vaj641i4pla6r8w22xqpqd";
|
||||
fetchSubmodules = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user