Skip to content

Commit 2aec6bb

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. 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 this is just for building the tool so it can be used. A devshell can be defined and used from there, but this allows it to be updated when new dependencies come in.
1 parent b49251f commit 2aec6bb

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
10+
outputs = inputs:
11+
inputs.flake-utils.lib.eachDefaultSystem (system:
12+
let
13+
pkgs = import inputs.nixpkgs { inherit system; };
14+
in
15+
{
16+
devShells.default = pkgs.mkShell {
17+
buildInputs = with pkgs; [
18+
autoconf
19+
gnumake
20+
sphinx
21+
];
22+
};
23+
}
24+
);
25+
}

0 commit comments

Comments
 (0)