From f3b7697207c136ff8a352c9266985b57dffd9f31 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Thu, 23 Jul 2020 22:15:42 +0200 Subject: [PATCH] Don't update flake.lock when building from a local nixpkgs --- flake.lock | 19 +++++++++---------- update.sh | 14 +++----------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 58d94b82..ca61a9b2 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1595332686, - "narHash": "sha256-GpzwLOx6fvtsAnjPqG0ob5GXR0e4eWThwgWedo3qeNc=", + "lastModified": 1595410516, + "narHash": "sha256-8lKGIGTyo1uVfdT0TXEJk9YAR/Tw08sRA/VLOm9ewco=", "owner": "numtide", "repo": "flake-utils", - "rev": "f99f5970824e210e84f9a766e2ea52d4af770182", + "rev": "8e1f14e82dcd87f484a5024a86e52399b1061416", "type": "github" }, "original": { @@ -39,13 +39,12 @@ }, "nixpkgs": { "locked": { - "lastModified": 1595402314, - "narHash": "sha256-LEHScTpv+Swf+LoqeaY128N2AC7vhWv7SlDnIJoB6sk=", - "ref": "master", - "rev": "5a687c0410ab6214d1467d535274b26c3f38b4b4", - "revCount": 235540, - "type": "git", - "url": "file:///data/home/charlotte/repos/nixpkgs" + "lastModified": 1595486616, + "narHash": "sha256-36b6SSE1Ef+i7LE2JE6qaq087Bhbrr8VPmcxr+lS2e8=", + "owner": "charvp", + "repo": "nixpkgs", + "rev": "871bc12bf4edd1a099d1fdef771f99a34af0cfad", + "type": "github" }, "original": { "owner": "charvp", diff --git a/update.sh b/update.sh index de87deb3..441e23d3 100755 --- a/update.sh +++ b/update.sh @@ -4,19 +4,11 @@ set -x nix flake update -BUILD_ARGS=( - "--builders" - "ssh://charlotte@sunspear.vanpetegem.me" - "--builders-use-substitutes" - "--extra-substituters" - "ssh://charlotte@sunspear.vanpetegem.me" - "--trusted-public-keys" - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= sunspear-nix-cache:4mgL4qS7EweCug1gAFiZKgQK+xuoJMBYThIUE+kPX4s=" -) +BUILD_ARGS=() -if [ -d "../nixpkgs" ] +if [ -d "../nixpkgs" -a -z "${NO_LOCAL:-}" ] then - BUILD_ARGS+=("--override-input" "nixpkgs" "../nixpkgs") + BUILD_ARGS+=("--override-input" "nixpkgs" "../nixpkgs" "--no-write-lock-file") fi sudo nix build --profile /nix/var/nix/profiles/system ".#nixosConfigurations.$(hostname).config.system.build.toplevel" --no-link "${BUILD_ARGS[@]}" && \