mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
add nix flake
This commit is contained in:
parent
a0c8dafe61
commit
784a9df0ca
1 changed files with 58 additions and 0 deletions
58
flake.nix
Normal file
58
flake.nix
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
description = "Nyxi Installer flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, ... } @ inputs:
|
||||||
|
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
checks.x86_64-linux.unitTests = (with pkgs; stdenv.mkDerivation {
|
||||||
|
pname = "nyxi-installer";
|
||||||
|
version = "2.0.0";
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = "https://gitlab.com/ahoneybun/nyxi-installer.git";
|
||||||
|
ref = "rust-rewrite";
|
||||||
|
rev = "a0c8dafe6186de0c6eebc68d413d08bccd4e2405";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [ cargo rustc ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cargo test
|
||||||
|
'';
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
gnumake
|
||||||
|
clang
|
||||||
|
llvmPackages.libclang
|
||||||
|
llvmPackages.clang
|
||||||
|
|
||||||
|
# System
|
||||||
|
btrfs-progs
|
||||||
|
e2fsprogs
|
||||||
|
openssl
|
||||||
|
pkg-config
|
||||||
|
util-linux
|
||||||
|
];
|
||||||
|
shellHook = ''
|
||||||
|
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"
|
||||||
|
export CLANG_PATH="${pkgs.llvmPackages.clang}/bin/clang"
|
||||||
|
export RUST_BACKTRACE=1
|
||||||
|
echo "Ready to make some Rust!"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue