{
description = "QName";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=master";
utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
naersk.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, utils, naersk }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = naersk.lib."${system}";
inputs = [ ];
in rec {
# `nix build`
packages.qname = naersk-lib.buildPackage {
pname = "qname";
root = ./.;
nativeBuildInputs = inputs;
};
defaultPackage = packages.qname;
# `nix develop`
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs;
[ valgrind xmlstarlet neovim rustc cargo clippy cargo-audit cargo-watch rust-analyzer rustfmt highlight libxml2 ] ++ inputs;
};
});
}