mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-21 18:10:42 -04:00
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{
|
|
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}";
|
|
ucg = with pkgs;
|
|
naersk-lib.buildPackage rec {
|
|
pname = "ucg";
|
|
version = "0.7.2";
|
|
src = ./.;
|
|
cargoBuildOptions = opts: opts ++ ["-p" "${pname}" ];
|
|
};
|
|
in
|
|
{
|
|
defaultPackage = ucg;
|
|
defaultApp = {
|
|
type = "app";
|
|
program = "${ucg}/bin/ucg";
|
|
};
|
|
});
|
|
} |