format flake, add gcc (#57)
This commit is contained in:
parent
8969a9e6d5
commit
c0eb488973
1 changed files with 60 additions and 38 deletions
98
flake.nix
98
flake.nix
|
|
@ -9,7 +9,14 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, fenix, nixpkgs, tsunami, ... }:
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
fenix,
|
||||||
|
nixpkgs,
|
||||||
|
tsunami,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
allSystems = [
|
allSystems = [
|
||||||
"x86_64-linux" # 64-bit Intel/AMD Linux
|
"x86_64-linux" # 64-bit Intel/AMD Linux
|
||||||
|
|
@ -17,24 +24,33 @@
|
||||||
"x86_64-darwin" # 64-bit Intel macOS
|
"x86_64-darwin" # 64-bit Intel macOS
|
||||||
"aarch64-darwin" # 64-bit ARM macOS
|
"aarch64-darwin" # 64-bit ARM macOS
|
||||||
];
|
];
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
forAllSystems =
|
||||||
inherit system;
|
f:
|
||||||
inherit tsunami;
|
nixpkgs.lib.genAttrs allSystems (
|
||||||
pkgs = import nixpkgs { inherit system; };
|
system:
|
||||||
fpkgs = import fenix { inherit system; };
|
f {
|
||||||
});
|
inherit system;
|
||||||
|
inherit tsunami;
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
fpkgs = import fenix { inherit system; };
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = forAllSystems
|
packages = forAllSystems (
|
||||||
({ pkgs, fpkgs, ... }:
|
{ pkgs, fpkgs, ... }:
|
||||||
let
|
let
|
||||||
toolchain = fpkgs.minimal.toolchain;
|
toolchain = fpkgs.minimal.toolchain;
|
||||||
fs = pkgs.lib.fileset;
|
fs = pkgs.lib.fileset;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
default = flurry;
|
default = flurry;
|
||||||
flurry =
|
flurry =
|
||||||
(pkgs.makeRustPlatform { cargo = toolchain; rustc = toolchain; }).buildRustPackage {
|
(pkgs.makeRustPlatform {
|
||||||
|
cargo = toolchain;
|
||||||
|
rustc = toolchain;
|
||||||
|
}).buildRustPackage
|
||||||
|
{
|
||||||
pname = "flurry";
|
pname = "flurry";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
|
@ -47,30 +63,36 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
devShells = forAllSystems
|
);
|
||||||
({ pkgs, fpkgs, system, ... }:
|
devShells = forAllSystems (
|
||||||
let
|
{
|
||||||
ffpkgs = fpkgs.complete;
|
pkgs,
|
||||||
in
|
fpkgs,
|
||||||
{
|
system,
|
||||||
default = pkgs.mkShell
|
...
|
||||||
{
|
}:
|
||||||
buildInputs = [
|
let
|
||||||
ffpkgs.cargo
|
ffpkgs = fpkgs.complete;
|
||||||
ffpkgs.clippy
|
in
|
||||||
ffpkgs.rust-src
|
{
|
||||||
ffpkgs.rustc
|
default = pkgs.mkShell {
|
||||||
ffpkgs.rustfmt
|
buildInputs = [
|
||||||
pkgs.wgo
|
ffpkgs.cargo
|
||||||
tsunami.packages.${system}.tsunami
|
ffpkgs.clippy
|
||||||
];
|
ffpkgs.rust-src
|
||||||
};
|
ffpkgs.rustc
|
||||||
});
|
ffpkgs.rustfmt
|
||||||
|
pkgs.gcc
|
||||||
|
pkgs.wgo
|
||||||
|
tsunami.packages.${system}.tsunami
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
hydraJobs = {
|
hydraJobs = {
|
||||||
devShell.x86_64-linux = self.devShells.x86_64-linux.default;
|
devShell.x86_64-linux = self.devShells.x86_64-linux.default;
|
||||||
flurry.x86_64-linux = self.packages.x86_64-linux.flurry;
|
flurry.x86_64-linux = self.packages.x86_64-linux.flurry;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue