feat: add nix output
This commit is contained in:
parent
7fa73aac6e
commit
1e04b94051
1 changed files with 26 additions and 3 deletions
29
flake.nix
29
flake.nix
|
|
@ -1,7 +1,13 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
outputs = { self, fenix, nixpkgs, ... }:
|
||||
let
|
||||
allSystems = [
|
||||
"x86_64-linux" # 64-bit Intel/AMD Linux
|
||||
|
|
@ -12,10 +18,26 @@
|
|||
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
||||
inherit system;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
fpkgs = import fenix { inherit system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
devShell = forAllSystems ({ system, pkgs }:
|
||||
packages = forAllSystems
|
||||
({ system, pkgs, fpkgs }:
|
||||
let
|
||||
toolchain = fpkgs.minimal.toolchain;
|
||||
in
|
||||
rec {
|
||||
default = flurry;
|
||||
flurry =
|
||||
(pkgs.makeRustPlatform { cargo = toolchain; rustc = toolchain; }).buildRustPackage {
|
||||
pname = "flurry";
|
||||
version = "0.1.0";
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
src = pkgs.lib.cleanSource ./.;
|
||||
};
|
||||
});
|
||||
devShell = forAllSystems ({ system, pkgs, ... }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.rustup
|
||||
|
|
@ -26,3 +48,4 @@
|
|||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue