Initial commit
This commit is contained in:
commit
c826b8a819
15 changed files with 4417 additions and 0 deletions
50
nix/flake.nix
Normal file
50
nix/flake.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
inputs = {
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
crane.url = "github:ipetkov/crane";
|
||||
};
|
||||
|
||||
outputs = { flake-utils, fenix, nixpkgs, crane, ... }:
|
||||
flake-utils.lib.eachDefaultSystem(system:
|
||||
let
|
||||
overlays = [ fenix.overlays.default ];
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
rust = with pkgs.fenix; combine [
|
||||
((fromToolchainName { name = "1.89"; sha256 = "sha256-+9FmLhAOezBZCOziO0Qct1NOrfpjNsXxc/8I0c7BdKE="; }).withComponents [
|
||||
"cargo"
|
||||
"rustc"
|
||||
"rust-src"
|
||||
"rust-analyzer"
|
||||
"clippy"
|
||||
"llvm-tools-preview"
|
||||
])
|
||||
default.rustfmt
|
||||
];
|
||||
llvm = pkgs.llvmPackages_20;
|
||||
package = import ./package.nix { inherit crane rust pkgs; };
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell.override {
|
||||
stdenv = pkgs.llvmPackages_20.stdenv;
|
||||
} {
|
||||
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
|
||||
packages = [ rust ] ++ (with pkgs; [
|
||||
libclang.lib
|
||||
]);
|
||||
buildInputs = with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
};
|
||||
|
||||
nixosModules.default = import ./module.nix { maid = package; };
|
||||
|
||||
packages.maid = package;
|
||||
packages.default = package;
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue