hai/flake.nix
Nicolas Berbiche 81a7be6c75 Initial commit
2020-08-20 20:50:20 -04:00

28 lines
827 B
Nix

{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # We want to use packages from the binary cache
flake-utils.url = "github:numtide/flake-utils";
gitignore = { url = "github:hercules-ci/gitignore.nix"; flake = false; };
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: let
pkgs = nixpkgs.legacyPackages.${system};
gitignoreSrc = pkgs.callPackage inputs.gitignore { };
in rec {
packages.hello = pkgs.callPackage ./default.nix { inherit gitignoreSrc; };
legacyPackages = packages;
defaultPackage = packages.hello;
devShell = pkgs.mkShell {
CARGO_INSTALL_ROOT = "${toString ./.}/.cargo";
buildInputs = with pkgs; [ cargo rustc git ];
};
});
}