turnon: 2.6.3 -> 2.7.4

mksafavi b2883552 ecb5ae71

+26 -16
+26 -16
pkgs/by-name/tu/turnon/package.nix
··· 1 1 { 2 2 lib, 3 - fetchFromGitHub, 3 + stdenv, 4 + fetchFromGitea, 4 5 rustPlatform, 5 6 cairo, 6 7 pango, ··· 9 10 blueprint-compiler, 10 11 wrapGAppsHook4, 11 12 gsettings-desktop-schemas, 13 + just, 12 14 }: 13 15 14 - rustPlatform.buildRustPackage rec { 16 + let 17 + version = "2.7.4"; 18 + in 19 + rustPlatform.buildRustPackage { 15 20 pname = "turnon"; 16 - version = "2.6.3"; 21 + version = version; 17 22 18 - src = fetchFromGitHub { 23 + src = fetchFromGitea { 24 + domain = "codeberg.org"; 19 25 owner = "swsnr"; 20 26 repo = "turnon"; 21 27 rev = "v${version}"; 22 - hash = "sha256-fRDyfgS+jLGFJTYIEXJ27cCM9knfbIjlGpYNU4OyoJ0="; 28 + hash = "sha256-RTLFajUMJHZoXKhy83G3c7a2fZ+P6CZXadFpbcPFLY8="; 23 29 }; 24 30 25 - cargoHash = "sha256-Bg3+PX5/BlqeN3EEFzBX42Dw4BbyKHlN1dnQSHnEz+c="; 31 + cargoHash = "sha256-8vqsQPbl3c2++8T5bjDjAWzm00qSDogT1YaumOC7qzk="; 26 32 27 33 doCheck = true; 28 34 ··· 39 45 pkg-config 40 46 blueprint-compiler 41 47 wrapGAppsHook4 48 + just 42 49 ]; 43 50 44 51 buildInputs = [ ··· 48 55 49 56 strictDeps = true; 50 57 51 - postInstall = 52 - # The build.rs compiles the settings schema and writes the compiled file next to the .xml file. 53 - # This copies the compiled file to a path that can be detected by gsettings-desktop-schemas 54 - '' 55 - mkdir -p "$out/share/glib-2.0/schemas" 56 - cp "schemas/gschemas.compiled" "$out/share/glib-2.0/schemas" 57 - ''; 58 + postPatch = '' 59 + substituteInPlace justfile \ 60 + --replace-fail "version := \`git describe\`" "version := \"${version}\"" \ 61 + --replace-fail "DESTPREFIX := '/app'" "DESTPREFIX := '$out'" \ 62 + --replace-fail "just --list" "just compile" # Replacing the default recipe with the compile command as just-hook-buildPhase runs the default recipe to compile the package. 63 + ''; 64 + 65 + postBuild = '' 66 + cargo build --release 67 + ''; 58 68 59 69 meta = { 60 70 description = "Turn on devices in your local network"; 61 - homepage = "https://github.com/swsnr/turnon"; 62 - license = lib.licenses.mpl20; 71 + homepage = "https://codeberg.org/swsnr/turnon"; 72 + license = lib.licenses.eupl12; 63 73 maintainers = with lib.maintainers; [ mksafavi ]; 64 - mainProgram = "turnon"; 74 + mainProgram = "de.swsnr.turnon"; 65 75 platforms = lib.platforms.linux; 66 76 }; 67 77 }