mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-21 18:10:42 -04:00
Add nix flake
This commit is contained in:
parent
74f6cb89e5
commit
1f25fa672f
34
flake.nix
Normal file
34
flake.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
description = "ucg a configuration language compiler";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
flake-compat = {
|
||||
url = github:edolstra/flake-compat;
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {self, nixpkgs, flake-utils, rust-overlay, naersk, flake-compat}:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
overlays = [ rust-overlay.overlay ];
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
naersk-lib = naersk.lib."${system}";
|
||||
in
|
||||
{
|
||||
defaultPackage = with pkgs;
|
||||
naersk-lib.buildPackage rec {
|
||||
pname = "ucg";
|
||||
version = "0.7.2";
|
||||
src = ./.;
|
||||
cargoBuildOptions = opts: opts ++ ["-p" "${pname}" ];
|
||||
};
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user