File: package.nix

package info (click to toggle)
wiremix 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 656 kB
  • sloc: makefile: 25
file content (40 lines) | stat: -rw-r--r-- 832 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  rustPlatform,
  lib,
  pkg-config,
  pipewire,
}:
let
  fs = lib.fileset;
  cargoPackage = (lib.importTOML ./Cargo.toml).package;
in
rustPlatform.buildRustPackage {
  pname = cargoPackage.name;
  version = cargoPackage.version;

  src = fs.toSource {
    root = ./.;
    fileset = fs.unions [
      (fs.fileFilter (file: builtins.any file.hasExt [ "rs" ]) ./src)
      ./build.rs
      ./wiremix.toml
      ./Cargo.lock
      ./Cargo.toml
    ];
  };

  nativeBuildInputs = [
    pkg-config
    rustPlatform.bindgenHook
  ];
  buildInputs = [ pipewire ];

  cargoLock.lockFile = ./Cargo.lock;

  # Vendor default configuration for reference or for wrapping
  # without having to commit the file to a git repository.
  postInstall = ''
    mkdir -p $out/share
    install -Dm755 ${./wiremix.toml} $out/share/wiremix.toml
  '';
}