Package the app with nix

This commit is contained in:
Alexander
2026-05-13 22:17:01 +02:00
parent 265f4958f0
commit 39622be117
2 changed files with 43 additions and 1 deletions
+6 -1
View File
@@ -38,7 +38,12 @@
inherit pre-commit-check; inherit pre-commit-check;
}; };
devShells.default = pkgs.mkShell rec { packages = rec {
musicfs = pkgs.callPackage ./package.nix { };
default = musicfs;
};
devShells.default = pkgs.mkShell {
inherit (pre-commit-check) shellHook; inherit (pre-commit-check) shellHook;
buildInputs = with pkgs; [ buildInputs = with pkgs; [
+37
View File
@@ -0,0 +1,37 @@
{
lib,
rustPlatform,
pkgs,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "musicfs";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
cargoHash = lib.fakeHash;
nativeBuildInputs = with pkgs; [
pkg-config
protobuf
];
buildInputs = with pkgs; [
openssl
fuse3
sqlite
];
PROTOC = "${pkgs.protobuf}/bin/protoc";
meta = {
description = "MusicFS - FUSE filesystem for music with metadata overlay";
homepage = "https://github.com/LichHunter/MusicFS";
license = lib.licenses.unlicense;
maintainers = [ ];
};
})