70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
|
|
fetchNpmDeps,
|
|
npmHooks,
|
|
nodejs,
|
|
cargo-tauri,
|
|
pkg-config,
|
|
wrapGAppsHook3,
|
|
|
|
openssl,
|
|
libsoup_3,
|
|
webkitgtk_4_1,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "gale";
|
|
version = "1.1.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Kesomannen";
|
|
repo = "gale";
|
|
rev = "refs/tags/${finalAttrs.version}";
|
|
hash = "sha256-yAfQuLfucz522ln0YNMy8nppp2jk6tGJnP/WhK7JdhI=";
|
|
};
|
|
|
|
npmDeps = fetchNpmDeps {
|
|
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
|
|
inherit (finalAttrs) src;
|
|
hash = "sha256-xKg/ABUdtylFpT3EisXVvyv38++KjucrZ+s3/fFjzmM=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
inherit (finalAttrs) pname version src;
|
|
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.cargoRoot}";
|
|
hash = "sha256-u7UbC9TyEQwYpcVWt8/NsweDNWbQi6NuD9ay9gmMDjg=";
|
|
};
|
|
|
|
cargoRoot = "src-tauri";
|
|
|
|
buildAndTestSubdir = finalAttrs.cargoRoot;
|
|
|
|
nativeBuildInputs = [
|
|
npmHooks.npmConfigHook
|
|
nodejs
|
|
rustPlatform.cargoSetupHook
|
|
cargo-tauri.hook
|
|
rustPlatform.cargoCheckHook
|
|
pkg-config
|
|
wrapGAppsHook3
|
|
];
|
|
|
|
buildInputs = [
|
|
libsoup_3
|
|
webkitgtk_4_1
|
|
openssl
|
|
];
|
|
|
|
meta = {
|
|
description = "Lightweight Thunderstore client";
|
|
homepage = "https://github.com/Kesomannen/gale";
|
|
license = lib.licenses.gpl3Only;
|
|
mainProgram = "gale";
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|