-
Notifications
You must be signed in to change notification settings - Fork 17
/
default.nix
66 lines (60 loc) · 1.43 KB
/
default.nix
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ pkgs ? import <nixpkgs> { }
, lib ? import <nixpkgs/lib>
, nixos-appstream-data ? (import
(pkgs.fetchFromGitHub {
owner = "vlinkz";
repo = "nixos-appstream-data";
rev = "66b3399e6d81017c10265611a151d1109ff1af1b";
hash = "sha256-oiEZD4sMpb2djxReg99GUo0RHWAehxSyQBbiz8Z4DJk=";
})
{ set = "all"; stdenv = pkgs.stdenv; lib = pkgs.lib; pkgs = pkgs; })
}: pkgs.stdenv.mkDerivation rec {
pname = "nix-software-center";
version = "0.1.2";
src = [ ./. ];
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"nix-data-0.0.2" = "sha256-yts2bkp9cn4SuYPYjgTNbOwTtpFxps3TU8zmS/ftN/Q=";
};
};
nativeBuildInputs = with pkgs; [
appstream-glib
polkit
gettext
desktop-file-utils
meson
ninja
pkg-config
git
wrapGAppsHook4
] ++ (with pkgs.rustPlatform; [
cargoSetupHook
cargo
rustc
]);
buildInputs = with pkgs; [
gdk-pixbuf
glib
gtk4
gtksourceview5
libadwaita
libxml2
openssl
wayland
gnome.adwaita-icon-theme
desktop-file-utils
nixos-appstream-data
];
patchPhase = ''
substituteInPlace ./src/lib.rs \
--replace "/usr/share/app-info" "${nixos-appstream-data}/share/app-info"
'';
postInstall = ''
wrapProgram $out/bin/nix-software-center --prefix PATH : '${lib.makeBinPath [
pkgs.gnome-console
pkgs.gtk3 # provides gtk-launch
pkgs.sqlite
]}'
'';
}