diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f3ecb3e2..52b74769 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,9 @@ name: "Build" + on: pull_request: push: + jobs: tests: strategy: @@ -17,6 +19,7 @@ jobs: signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - run: rm -rf /opt& - run: nix-build --keep-going + tests-flakes: strategy: matrix: @@ -30,5 +33,11 @@ jobs: name: pre-commit-hooks signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - run: rm -rf /opt& - - run: nix flake check -L --show-trace + + - name: Check nixpkgs-unstable + run: nix flake check -L --show-trace + + - name: Check nixpkgs-stable + run: nix flake check -L --show-trace --override-input nixpkgs github:NixOS/nixpkgs/nixos-24.11 + - run: nix eval .#lib.x86_64-linux.run --show-trace diff --git a/flake.lock b/flake.lock index c9dde1aa..c9464ffa 100644 --- a/flake.lock +++ b/flake.lock @@ -52,28 +52,11 @@ "type": "github" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1730741070, - "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "flake-compat": "flake-compat", "gitignore": "gitignore", - "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index b8c5cf70..7374acf1 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,6 @@ description = "Seamless integration of https://pre-commit.com git hooks with Nix."; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; inputs.flake-compat = { url = "github:edolstra/flake-compat"; flake = false; @@ -12,7 +11,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs, gitignore, nixpkgs-stable, ... }: + outputs = { self, nixpkgs, gitignore, ... }: let lib = nixpkgs.lib; defaultSystems = [ @@ -24,7 +23,6 @@ depsFor = lib.genAttrs defaultSystems (system: { pkgs = nixpkgs.legacyPackages.${system}; exposed = import ./nix { inherit nixpkgs system; gitignore-nix-src = gitignore; isFlakes = true; }; - exposed-stable = import ./nix { nixpkgs = nixpkgs-stable; inherit system; gitignore-nix-src = gitignore; isFlakes = true; }; }); forAllSystems = fn: lib.genAttrs defaultSystems (system: fn depsFor.${system}); in @@ -48,11 +46,7 @@ }; }); - checks = forAllSystems ({ exposed, exposed-stable, ... }: - lib.filterAttrs (k: v: v != null) - (exposed.checks - // (lib.mapAttrs' (name: value: lib.nameValuePair "stable-${name}" value) - exposed-stable.checks))); + checks = forAllSystems ({ exposed, ... }: lib.filterAttrs (k: v: v != null) exposed.checks); lib = forAllSystems ({ exposed, ... }: { inherit (exposed) run; });