From b49c9e63d98d753c30ef3361474eb3a763c88abd Mon Sep 17 00:00:00 2001 From: "Markus S. Wamser" Date: Fri, 26 Apr 2024 22:09:51 +0200 Subject: [PATCH 1/2] do not create a fresh instance of nixpkgs Reuse the passed instance of nixpkgs instead of re-evaluating and creating a new instance. See zimbatm's "1000 instances of nixpkgs" for backround info. --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 49099e91..c9e02e70 100644 --- a/flake.nix +++ b/flake.nix @@ -13,13 +13,13 @@ # provide db-package for all archs, but scaper/test only for most common (utils.lib.eachSystem utils.lib.allSystems (system: let - pkgs = import nixpkgs { inherit system; }; + pkgs = nixpkgs.legacyPackages.${system}; in nixpkgs.lib.recursiveUpdate (nixpkgs.lib.optionalAttrs (builtins.elem system utils.lib.defaultSystems) rec { packages.updater = pkgs.callPackage ./updater.nix {}; apps.updater = { type = "app"; program = "${packages.updater}/bin/updater";}; - devShell = with pkgs; mkShell { + devShells.default = with pkgs; mkShell { buildInputs = [ nim nimble-unwrapped nimlsp ]; }; checks.vmtest = import ./test.nix { inherit pkgs; flake = self; }; # nixpkgs must be set to a revision present in the JSON file @@ -33,4 +33,4 @@ { nixosModules.programs-sqlite = pass@{ pkgs, ... }: (import ./module.nix { programs-sqlite = (getDB pkgs); }) pass; }; -} \ No newline at end of file +} From cb8acb14fded9183be94e946526a19eb84e5f06f Mon Sep 17 00:00:00 2001 From: "Markus S. Wamser" Date: Fri, 26 Apr 2024 22:11:51 +0200 Subject: [PATCH 2/2] chore(CI,deps): bump cache action --- .github/workflows/build.yml | 2 +- .github/workflows/scrape.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6687258..44ffcbd0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: name: flake-programs-sqlite authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Cache build result on GitHub - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: updater.bundle key: ${{ runner.os }}-bundle-${{ hashFiles('**/flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/*.nim*') }} diff --git a/.github/workflows/scrape.yml b/.github/workflows/scrape.yml index e1ba0de7..4fafe052 100644 --- a/.github/workflows/scrape.yml +++ b/.github/workflows/scrape.yml @@ -18,7 +18,7 @@ jobs: git config user.email github-actions@github.com - name: fetch from cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: updater.bundle key: ${{ runner.os }}-bundle-${{ hashFiles('**/flake.lock') }}-${{ hashFiles('**/*.nix') }}-${{ hashFiles('**/*.nim*') }}