2 Commits

Author SHA1 Message Date
eric
80cc529de7 chore(release): v2.0.1 2026-03-06 17:37:39 +01:00
eric
4d2579ae1e fix: don't run tests in consumers of the lib 2026-03-06 17:37:27 +01:00
4 changed files with 28 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ Simple Nix flake library for:
From your new project folder: From your new project folder:
```bash ```bash
nix flake new myapp -t 'git+https://git.dgren.dev/eric/nix-flake-lib?ref=v2.0.0#default' --refresh nix flake new myapp -t 'git+https://git.dgren.dev/eric/nix-flake-lib?ref=v2.0.1#default' --refresh
``` ```
## Use the library (existing repo) ## Use the library (existing repo)
@@ -24,7 +24,7 @@ nix flake new myapp -t 'git+https://git.dgren.dev/eric/nix-flake-lib?ref=v2.0.0#
Add this flake input: Add this flake input:
```nix ```nix
inputs.devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v2.0.0"; inputs.devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v2.0.1";
inputs.devshell-lib.inputs.nixpkgs.follows = "nixpkgs"; inputs.devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
``` ```
@@ -33,6 +33,7 @@ Create your shell from `mkDevShell`:
```nix ```nix
env = devshell-lib.lib.mkDevShell { env = devshell-lib.lib.mkDevShell {
inherit system; inherit system;
src = ./.;
extraPackages = [ ]; extraPackages = [ ];
tools = [ ]; tools = [ ];
additionalHooks = { }; additionalHooks = { };

View File

@@ -1,3 +1,3 @@
2.0.0 2.0.1
stable stable
0 0

View File

@@ -32,6 +32,7 @@
mkDevShell = mkDevShell =
{ {
system, system,
src ? ./.,
extraPackages ? [ ], extraPackages ? [ ],
extraShellHook ? "", extraShellHook ? "",
additionalHooks ? { }, additionalHooks ? { },
@@ -78,7 +79,7 @@
}; };
pre-commit-check = git-hooks.lib.${system}.run { pre-commit-check = git-hooks.lib.${system}.run {
src = ./.; inherit src;
hooks = { hooks = {
treefmt = { treefmt = {
enable = true; enable = true;

View File

@@ -4,7 +4,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v2.0.0"; devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v2.0.1";
devshell-lib.inputs.nixpkgs.follows = "nixpkgs"; devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -80,7 +80,13 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
config = mkDevShellConfig pkgs; config = mkDevShellConfig pkgs;
env = devshell-lib.lib.mkDevShell ( env = devshell-lib.lib.mkDevShell (
({ inherit system; } // config) (
{
inherit system;
src = ./.;
}
// config
)
// { // {
extraPackages = config.extraPackages ++ [ self.packages.${system}.release ]; extraPackages = config.extraPackages ++ [ self.packages.${system}.release ];
} }
@@ -102,7 +108,13 @@
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
config = mkDevShellConfig pkgs; config = mkDevShellConfig pkgs;
env = devshell-lib.lib.mkDevShell ({ inherit system; } // config); env = devshell-lib.lib.mkDevShell (
{
inherit system;
src = ./.;
}
// config
);
in in
{ {
inherit (env) pre-commit-check; inherit (env) pre-commit-check;
@@ -115,7 +127,13 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
config = mkDevShellConfig pkgs; config = mkDevShellConfig pkgs;
in in
(devshell-lib.lib.mkDevShell ({ inherit system; } // config)).formatter (devshell-lib.lib.mkDevShell (
{
inherit system;
src = ./.;
}
// config
)).formatter
); );
# Release command (`release`) # Release command (`release`)