Skip to content

Commit a662582

Browse files
committed
Add flake.nix file for Nix/NixOS users
This flake defines a development shell for developing argbash. It ensures that all dependencies used to build this project are pinned to a specific version (via a lock file). In this case, make, m4, and autoconf, and sphinx. This guarantees deterministic build behavior; builds always use the same exact dependencies until the lock file is updated. Any updates to the dependencies on a system level will not be able to break our build if an API or a behavior of such a dependency has changed. The nixpkgs repository already has a build script for argbash here: https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ar/argbash But that is just for building the tool so it can be used. A devshell can be defined and used from there, but this patch allows it to be updated when new dependencies come in, allowing us to keep the flake in sync with development of this tool.
1 parent b49251f commit a662582

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
nixConfig.bash-prompt-suffix = "\[nix\] ";
3+
4+
inputs = {
5+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = inputs:
10+
inputs.flake-utils.lib.eachDefaultSystem (system:
11+
let
12+
pkgs = import inputs.nixpkgs { inherit system; };
13+
in
14+
{
15+
devShells.default = pkgs.mkShell {
16+
buildInputs = with pkgs; [
17+
autoconf
18+
gnumake
19+
sphinx
20+
];
21+
};
22+
}
23+
);
24+
}

0 commit comments

Comments
 (0)