Add flake.nix
This commit is contained in:
37
flake.nix
Normal file
37
flake.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
outputs = { self, nixpkgs, ... }: {
|
||||
packages.x86_64-linux = let
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
in {
|
||||
nixos-exporter = pkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "nixos-exporter";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ./.;
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
|
||||
};
|
||||
default = self.packages.x86_64-linux.nixos-exporter;
|
||||
};
|
||||
|
||||
apps.x86_64-linux = {
|
||||
nixos-exporter = {
|
||||
type = "app";
|
||||
program = self.packages.x86_64-linux.nixos-exporter + "/bin/nixos-exporter";
|
||||
};
|
||||
default = self.apps.x86_64-linux.nixos-exporter;
|
||||
};
|
||||
|
||||
hydraJobs = {
|
||||
inherit (self)
|
||||
packages;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user