nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 7cb70e21b72f3151ba6a3cf8c4231fd7c02a54b4
parent 4c34ef0d39e63703bca6bc6139b6da4e802e64ef
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Wed, 17 Dec 2025 21:16:36 +0400

Up

Diffstat:
Mpkgs/by-name/ag/agunua/package.nix | 10+++++-----
Mpkgs/by-name/sa/sasplanet/package.nix | 41++++++++++++++++++++++++++++++++++-------
2 files changed, 39 insertions(+), 12 deletions(-)

diff --git a/pkgs/by-name/ag/agunua/package.nix b/pkgs/by-name/ag/agunua/package.nix @@ -1,10 +1,10 @@ { lib, fetchFromGitLab, - python312Packages, + python3Packages, }: -python312Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "agunua"; version = "1.7.2"; pyproject = true; @@ -17,16 +17,16 @@ python312Packages.buildPythonApplication rec { hash = "sha256-a/2906Hyr5rropuwxZQk1vXU0Ilaw1cPZjJlOdoJhsk="; }; - build-system = with python312Packages; [ setuptools ]; + build-system = with python3Packages; [ setuptools ]; - dependencies = with python312Packages; [ + dependencies = with python3Packages; [ pyopenssl pysocks netaddr legacy-cgi ]; - nativeCheckInputs = with python312Packages; [ pytestCheckHook ]; + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; disabledTestPaths = [ "tests/test_egsam.py" diff --git a/pkgs/by-name/sa/sasplanet/package.nix b/pkgs/by-name/sa/sasplanet/package.nix @@ -4,6 +4,9 @@ fetchfromgh, fetchgdrive, fetchgit, + fetchurl, + copyDesktopItems, + makeDesktopItem, unzip, wineWow64Packages, makeWrapper, @@ -21,6 +24,10 @@ let hash = "sha256-6ZF4PsEFEGYt85umWJ/ToBW3JdeKEF4n6uU73hU8oLs="; name = "Extremum.zip"; }; + icon = fetchurl { + url = "https://raw.githubusercontent.com/sasgis/sas.planet.src/8f8c9aedd9a641feec419a5609474d3a75cc24c9/Resources/MainIcon/icon64.png"; + hash = "sha256-KQR5fGrF6cLBDeIEVmU+YPQIdzFn43NrPLbTqGAKhp0="; + }; in stdenv.mkDerivation (finalAttrs: { pname = "sasplanet"; @@ -37,26 +44,45 @@ stdenv.mkDerivation (finalAttrs: { sourceRoot = "."; nativeBuildInputs = [ - unzip + copyDesktopItems makeWrapper + unzip + ]; + + desktopItems = [ + (makeDesktopItem { + name = "sasplanet"; + type = "Application"; + desktopName = "SAS.Planet"; + icon = "sasplanet"; + exec = "sasplanet"; + terminal = false; + categories = [ + "Science" + "Maps" + "Geography" + ]; + }) ]; # Post install regedit: # * increase font size: https://askubuntu.com/a/1313810 # * dark theme: https://gist.github.com/Zeinok/ceaf6ff204792dde0ae31e0199d89398 installPhase = '' + runHook preInstall + mkdir -p $out/opt/sasplanet cp -r . $out/opt/sasplanet + install -Dm644 ${icon} $out/share/icons/hicolor/64x64/apps/sasplanet.png makeWrapper ${wineWow64Packages.stable}/bin/wine $out/bin/sasplanet \ --run "[ -d \$HOME/.sasplanet ] || { cp -r $out/opt/sasplanet \$HOME/.sasplanet && chmod -R +w \$HOME/.sasplanet; }" \ --add-flags "\$HOME/.sasplanet/SASPlanet.exe" - '' - + lib.optionalString withMaps '' - cp -r ${maps}/* $out/opt/sasplanet/Maps/sas.maps - '' - + lib.optionalString withExtremum '' - unzip ${extremum} -d $out/opt/sasplanet/Maps/sas.maps + + ${lib.optionalString withMaps "cp -r ${maps}/* $out/opt/sasplanet/Maps/sas.maps"} + ${lib.optionalString withExtremum "unzip ${extremum} -d $out/opt/sasplanet/Maps/sas.maps"} + + runHook postInstall ''; preferLocalBuild = true; @@ -69,6 +95,7 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.gpl3Plus; maintainers = [ lib.maintainers.sikmir ]; platforms = lib.platforms.all; + mainProgram = "sasplanet"; skip.ci = true; }; })