add wrapped package to flake
This commit is contained in:
parent
1bc7b0ec2f
commit
c600845d17
25
flake.nix
25
flake.nix
|
@ -5,11 +5,32 @@
|
|||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
in {
|
||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||
buildDeps = {
|
||||
buildInputs = with pkgs; [ ffmpeg openssl ];
|
||||
nativeBuildInputs = with pkgs; [ rustc cargo pkgconfig clang ];
|
||||
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
|
||||
};
|
||||
pname = "screencap-bot";
|
||||
version = "0.1";
|
||||
in rec {
|
||||
packages.x86_64-linux."${pname}-unwrapped" = pkgs.rustPlatform.buildRustPackage ({
|
||||
inherit pname version;
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
} // buildDeps);
|
||||
|
||||
packages.x86_64-linux.${pname} = pkgs.symlinkJoin {
|
||||
name = "${pname}-${version}";
|
||||
paths = [ packages.x86_64-linux."${pname}-unwrapped" ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/${pname} \
|
||||
--prefix PATH : ${pkgs.ffmpeg}/bin
|
||||
'';
|
||||
};
|
||||
|
||||
packages.x86_64-linux.default = packages.x86_64-linux.${pname};
|
||||
|
||||
devShells.x86_64-linux.default = pkgs.mkShell buildDeps;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue