zaphyra's git: tgcNUR

fork of https://git.transgirl.cafe/zaphoid/tgc-nix-user-repository

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 
41 
42 
43 
44 
45 
46 
47 
{
  tgcMaintainers,
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  dbus,
  ...
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "dssd";
  version = "0.3.3";
  rev = "v${finalAttrs.version}";
  srcHash = "sha256-gAV4gwrfvYfc2f1tDY/cNOFMrQzrzHSmEFsKg7ke/6c=";
  cargoHash = "sha256-yX2/2TW3FNbqwzR6+5yP26E2Eps0bTJgJJrDIQG2KQU=";

  src = fetchFromGitHub {
    owner = "ylxdzsw";
    repo = finalAttrs.pname;
    hash = finalAttrs.srcHash;
    inherit (finalAttrs) rev;
  };

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [
    dbus
  ];

  postInstall = ''
    mkdir -p $out/share/dbus-1/services

    cp ./org.freedesktop.secrets.service $out/share/dbus-1/services/
  '';

  meta = {
    mainProgram = "dssd";
    description = "Dead Simple Secret Daemon";
    homepage = "https://github.com/ylxdzsw/dssd";
    license = [ lib.licenses.mit ];
    platforms = lib.platforms.linux;
    maintainers = [ tgcMaintainers.zaphyra ];
  };
})