2022-09-23 07:07:16 +03:00
|
|
|
{ pkgs ? import <nixpkgs> { }
|
|
|
|
, lib ? import <nixpkgs/lib>
|
2022-08-27 00:48:43 +03:00
|
|
|
}:
|
|
|
|
let
|
2022-09-23 07:07:16 +03:00
|
|
|
nixos-appstream-data = (import
|
|
|
|
(pkgs.fetchFromGitHub {
|
|
|
|
owner = "vlinkz";
|
|
|
|
repo = "nixos-appstream-data";
|
|
|
|
rev = "66b3399e6d81017c10265611a151d1109ff1af1b";
|
|
|
|
hash = "sha256-oiEZD4sMpb2djxReg99GUo0RHWAehxSyQBbiz8Z4DJk=";
|
|
|
|
})
|
2022-10-28 02:19:24 +03:00
|
|
|
{ set = "all"; stdenv = pkgs.stdenv; lib = pkgs.lib; pkgs = pkgs; });
|
2022-09-23 07:07:16 +03:00
|
|
|
in
|
|
|
|
pkgs.stdenv.mkDerivation rec {
|
2022-08-27 00:48:43 +03:00
|
|
|
pname = "nix-software-center";
|
2023-04-03 02:18:44 +03:00
|
|
|
version = "0.1.2";
|
2022-08-27 00:48:43 +03:00
|
|
|
|
|
|
|
src = [ ./. ];
|
|
|
|
|
2023-04-03 02:18:44 +03:00
|
|
|
cargoDeps = pkgs.rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"nix-data-0.0.2" = "sha256-yts2bkp9cn4SuYPYjgTNbOwTtpFxps3TU8zmS/ftN/Q=";
|
|
|
|
};
|
2022-08-27 00:48:43 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
appstream-glib
|
|
|
|
polkit
|
|
|
|
gettext
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
git
|
|
|
|
wrapGAppsHook4
|
|
|
|
] ++ (with pkgs.rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
rust.cargo
|
|
|
|
rust.rustc
|
|
|
|
]);
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
gtk4
|
|
|
|
gtksourceview5
|
2022-10-27 04:59:58 +03:00
|
|
|
libadwaita
|
|
|
|
libxml2
|
2022-08-27 00:48:43 +03:00
|
|
|
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"
|
|
|
|
'';
|
2022-09-30 08:59:14 +03:00
|
|
|
|
|
|
|
postInstall = ''
|
2022-10-28 22:06:06 +03:00
|
|
|
wrapProgram $out/bin/nix-software-center --prefix PATH : '${lib.makeBinPath [ pkgs.gnome-console pkgs.sqlite ]}'
|
2022-09-30 08:59:14 +03:00
|
|
|
'';
|
2022-08-27 00:48:43 +03:00
|
|
|
}
|