Skip to content

Commit

Permalink
Remove nixpkgs-stable input
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Dec 31, 2024
1 parent f0f0dc4 commit 76a4362
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: "Build"

on:
pull_request:
push:

jobs:
tests:
strategy:
Expand All @@ -17,6 +19,7 @@ jobs:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: rm -rf /opt&
- run: nix-build --keep-going

tests-flakes:
strategy:
matrix:
Expand All @@ -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
19 changes: 1 addition & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 2 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -12,7 +11,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};

outputs = { self, nixpkgs, gitignore, nixpkgs-stable, ... }:
outputs = { self, nixpkgs, gitignore, ... }:
let
lib = nixpkgs.lib;
defaultSystems = [
Expand All @@ -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
Expand All @@ -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; });

Expand Down

0 comments on commit 76a4362

Please sign in to comment.