Add Nix flake - #87
Conversation
528cee8 to
9e26dcb
Compare
Add a Nix flake that creates a package using `libgit2` and `pkg-config`. Pinning nixpkgs to 22.11 ensures the correct version of `libgit2` is used as per the README with no changed needed to the source code. With this in place, the package can be build using `nix build` which creates an executable at `result/bin/splitsh-lite`. A dev shell can also be started with `nix develop` based on the package inputs.
|
Tested with |
Expose the splitsh-lite package as `default.nix` so the repository can
be consumed with `flake = false`. This keeps `flake.nix` as a
development-only interface and avoids pulling development dependencies
into consuming repositories.
Update `flake.nix` to build the package with `pkgs.callPackage ./. { }`.
|
Update: expose the package via What changed
Why this is better
Instead, the package is exposed as a plain Consumers can now use the tool directly with standard Nix: inputs.splitsh-lite = {
url = "github:splitsh/lite";
flake = false;
};
environment.systemPackages = [
(pkgs.callPackage inputs.splitsh-lite {})
];This keeps the interface minimal. The consumer decides where the package |
Add a Nix flake that creates a package using
libgit2andpkg-config.Pinning nixpkgs to 22.11 ensures the correct version of
libgit2is used as per the README with no changed needed to the source code.With this in place, the package can be build using
nix buildwhich creates an executable atresult/bin/lite.A dev shell can also be started with
nix developbased on the package inputs.