Compare commits

...

2 Commits

Author SHA1 Message Date
Alexander e4bf557151 Fix the nix package build 2026-05-13 23:22:26 +02:00
Alexander 39622be117 Package the app with nix 2026-05-13 22:17:01 +02:00
5 changed files with 56 additions and 5 deletions
-1
View File
@@ -18,7 +18,6 @@ result
.cargo/
.direnv/
.pre-commit-config.yaml
dist/
###
# Rust
+3 -3
View File
@@ -277,7 +277,7 @@ mod tests {
#[test]
fn test_event_type_name() {
let handler = WebhookHandler::new(vec![]);
let handler = WebhookHandler::new(vec![]).unwrap();
let event = Event::SyncStarted {
origin_id: OriginId::from("test"),
@@ -287,7 +287,7 @@ mod tests {
#[test]
fn test_matches_filter_empty() {
let handler = WebhookHandler::new(vec![]);
let handler = WebhookHandler::new(vec![]).unwrap();
let config = WebhookConfig {
url: "http://example.com".to_string(),
secret: None,
@@ -304,7 +304,7 @@ mod tests {
#[test]
fn test_matches_filter_specific() {
let handler = WebhookHandler::new(vec![]);
let handler = WebhookHandler::new(vec![]).unwrap();
let config = WebhookConfig {
url: "http://example.com".to_string(),
secret: None,
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=MusicFS - Virtual FUSE Filesystem for Music
After=network.target
[Service]
ExecStart=/usr/bin/musicfs mount /mnt/music --origin /path/to/music
ExecStopPost=/usr/bin/fusermount -u /mnt/music
Restart=on-failure
[Install]
WantedBy=multi-user.target
+6 -1
View File
@@ -38,7 +38,12 @@
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;
buildInputs = with pkgs; [
+36
View File
@@ -0,0 +1,36 @@
{
lib,
rustPlatform,
pkgs,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "musicfs";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
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 = [ ];
};
})