55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
flake-utils,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
};
|
|
in
|
|
rec {
|
|
packages.karnaugh = pkgs.rustPlatform.buildRustPackage (final: {
|
|
pname = "karnaugh";
|
|
version = "0.1.3";
|
|
src = self;
|
|
cargoHash = "sha256-HwwvbYf9hKBANbIoxBQFOgya3K7SwWZCPZKvLGB057U=";
|
|
});
|
|
packages.container = pkgs.dockerTools.buildImage {
|
|
name = "karnaugh";
|
|
tag = packages.karnaugh.version;
|
|
|
|
copyToRoot = pkgs.buildEnv {
|
|
name = "karnaugh-root";
|
|
paths = [ packages.karnaugh ];
|
|
pathsToLink = [ "/bin" ];
|
|
};
|
|
|
|
config = {
|
|
Entrypoint = [ "/bin/karnaugh" ];
|
|
};
|
|
};
|
|
packages.default = packages.karnaugh;
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
cargo
|
|
rustc
|
|
rustfmt
|
|
clippy
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|