Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e445e49baf | ||
|
|
ef3cf30a34 |
@@ -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=v1.0.4#default' --refresh
|
nix flake new myapp -t 'git+https://git.dgren.dev/eric/nix-flake-lib?ref=v1.0.5#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=v1.0.4#
|
|||||||
Add this flake input:
|
Add this flake input:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
inputs.devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v1.0.4";
|
inputs.devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v1.0.5";
|
||||||
inputs.devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
|
inputs.devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -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=v1.0.4";
|
devshell-lib.url = "git+https://git.dgren.dev/eric/nix-flake-lib?ref=v1.0.5";
|
||||||
devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
|
devshell-lib.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -79,13 +79,24 @@
|
|||||||
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; } // config)
|
||||||
|
// {
|
||||||
|
extraPackages = config.extraPackages ++ [ self.packages.${system}.release ];
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = env.shell;
|
default = env.shell;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
packages = forAllSystems (system: {
|
||||||
|
release = devshell-lib.lib.mkRelease {
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
checks = forAllSystems (
|
checks = forAllSystems (
|
||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
@@ -107,7 +118,7 @@
|
|||||||
(devshell-lib.lib.mkDevShell ({ inherit system; } // config)).formatter
|
(devshell-lib.lib.mkDevShell ({ inherit system; } // config)).formatter
|
||||||
);
|
);
|
||||||
|
|
||||||
# Optional: release command (`release`)
|
# Release command (`release`)
|
||||||
#
|
#
|
||||||
# The release script always updates VERSION first, then:
|
# The release script always updates VERSION first, then:
|
||||||
# 1) runs release steps in order (file writes and scripts)
|
# 1) runs release steps in order (file writes and scripts)
|
||||||
@@ -117,6 +128,7 @@
|
|||||||
# Runtime env vars available in release.run/postVersion:
|
# Runtime env vars available in release.run/postVersion:
|
||||||
# BASE_VERSION, CHANNEL, PRERELEASE_NUM, FULL_VERSION, FULL_TAG
|
# BASE_VERSION, CHANNEL, PRERELEASE_NUM, FULL_VERSION, FULL_TAG
|
||||||
#
|
#
|
||||||
|
# To customize release behavior in your repo, edit:
|
||||||
# packages = forAllSystems (
|
# packages = forAllSystems (
|
||||||
# system:
|
# system:
|
||||||
# {
|
# {
|
||||||
|
|||||||
Reference in New Issue
Block a user