squirreldisk: init at 0.3.4
This commit is contained in:
parent
899fe5550b
commit
0eedc765e2
3 changed files with 4187 additions and 0 deletions
4060
pkgs/by-name/sq/squirreldisk/Cargo.lock
generated
Normal file
4060
pkgs/by-name/sq/squirreldisk/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
40
pkgs/by-name/sq/squirreldisk/package.json
Normal file
40
pkgs/by-name/sq/squirreldisk/package.json
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "squirreldisk-tauri",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^1.2.0",
|
||||
"d3": "^7.8.2",
|
||||
"mongoid-js": "^1.3.0",
|
||||
"pretty-bytes": "^6.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-beautiful-dnd": "^13.1.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.8.0",
|
||||
"shade-blend-color": "^1.0.0",
|
||||
"uuid": "^9.0.0",
|
||||
"vscode-icons-js": "^11.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.2.2",
|
||||
"@types/d3": "^7.4.0",
|
||||
"@types/node": "^18.7.10",
|
||||
"@types/react": "^18.0.15",
|
||||
"@types/react-beautiful-dnd": "^13.1.3",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@vitejs/plugin-react": "^3.0.0",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"postcss": "^8.4.21",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"typescript": "^4.6.4",
|
||||
"vite": "^4.0.0"
|
||||
}
|
||||
}
|
87
pkgs/by-name/sq/squirreldisk/package.nix
Normal file
87
pkgs/by-name/sq/squirreldisk/package.nix
Normal file
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
dbus,
|
||||
openssl,
|
||||
freetype,
|
||||
libsoup,
|
||||
gtk3,
|
||||
webkitgtk,
|
||||
pkg-config,
|
||||
wrapGAppsHook,
|
||||
parallel-disk-usage,
|
||||
fetchFromGitHub,
|
||||
buildNpmPackage,
|
||||
rustPlatform,
|
||||
lib,
|
||||
}: let
|
||||
pname = "squirreldisk";
|
||||
version = "0.3.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adileo";
|
||||
repo = "squirreldisk";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-As2nvc68knjeLPuX0QLBoybj8vuvkpS5Vr+7U7E5CjA=";
|
||||
};
|
||||
frontend-build = buildNpmPackage {
|
||||
inherit version src;
|
||||
pname = "squirreldisk-ui";
|
||||
|
||||
npmDepsHash = "sha256-Japcn0KYP7aYIDK8+Ns+mrnbbAb0fLWXHIV2+yltI6I=";
|
||||
|
||||
packageJSON = ./package.json;
|
||||
postBuild = ''
|
||||
cp -r dist/ $out
|
||||
'';
|
||||
distPhase = "true";
|
||||
dontInstall = true;
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit version src pname;
|
||||
|
||||
sourceRoot = "${src.name}/src-tauri";
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"window-shadows-0.2.1" = "sha256-3meM04TG63PvB0M5wUH1cDMBo7ObcB0zdgwGt2aKHMs=";
|
||||
};
|
||||
};
|
||||
|
||||
# copy the frontend static resources to final build directory
|
||||
# Also modify tauri.conf.json so that it expects the resources at the new location
|
||||
postPatch = ''
|
||||
cp ${./Cargo.lock} Cargo.lock
|
||||
|
||||
mkdir -p frontend-build
|
||||
cp -r ${frontend-build}/* frontend-build
|
||||
|
||||
substituteInPlace tauri.conf.json --replace-fail '"distDir": "../dist"' '"distDir": "./frontend-build"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [pkg-config wrapGAppsHook];
|
||||
buildInputs = [dbus openssl freetype libsoup gtk3 webkitgtk];
|
||||
|
||||
# Disable checkPhase, since the project doesn't contain tests
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/squirreldisk-tauri $out/bin/squirreldisk
|
||||
# Use pdu binary from nixpkgs, since the default packaged binary has issues.
|
||||
cp ${parallel-disk-usage}/bin/pdu $out/bin/pdu
|
||||
'';
|
||||
|
||||
# WEBKIT_DISABLE_COMPOSITING_MODE essential in NVIDIA + compositor https://github.com/NixOS/nixpkgs/issues/212064#issuecomment-1400202079
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/squirreldisk" \
|
||||
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross-platform disk usage analysis tool";
|
||||
homepage = "https://www.squirreldisk.com/";
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = with maintainers; [peret];
|
||||
mainProgram = "squirreldisk";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue