mirror of
https://github.com/socatlolmeow/drift.git
synced 2026-11-03 19:27:19 +00:00
add(nix): Added as a nix flake
This commit is contained in:
parent
ae399991a0
commit
25fe357d57
3 changed files with 54 additions and 0 deletions
26
flake.nix
Normal file
26
flake.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forAll = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
packages = forAll (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
default = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "drift";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/drift \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.mpv pkgs.yt-dlp ]}
|
||||
'';
|
||||
meta.mainProgram = "drift";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue