cells/flake.nix

41 lines
1.3 KiB
Nix

{
description = "Cells";
inputs.nac3 = { type = "git"; url = "https://git.m-labs.hk/m-labs/nac3.git"; };
outputs = { self, nac3 }:
let
pkgs = import nac3.inputs.nixpkgs { system = "x86_64-linux"; };
libraryPath = pkgs.lib.makeLibraryPath [ pkgs.wayland pkgs.libxkbcommon pkgs.libGL ];
in {
packages.x86_64-linux.default = pkgs.rustPlatform.buildRustPackage {
name = "cells";
src = pkgs.lib.cleanSource ./.;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"nac3ast-0.1.0" = "sha256-pUgwm4mgbXNh5QtkJ9+Fr55dKf3uRSpKeFwlvZz1OkQ=";
};
};
nativeBuildInputs = [
nac3.packages.x86_64-linux.llvm-nac3
nac3.packages.x86_64-linux.llvm-tools-irrt
pkgs.makeWrapper
];
buildInputs = [ nac3.packages.x86_64-linux.llvm-nac3 ];
postFixup = "wrapProgram $out/bin/cells --set LD_LIBRARY_PATH ${libraryPath}";
};
devShells.x86_64-linux.default = pkgs.mkShell {
name = "dev-shell-cells";
buildInputs = [
pkgs.cargo
pkgs.rustc
pkgs.rustfmt
nac3.packages.x86_64-linux.llvm-nac3
nac3.packages.x86_64-linux.llvm-tools-irrt
];
shellHook = "export LD_LIBRARY_PATH=${libraryPath}";
};
};
}