desktoppr: init at 0.5 (#397284)

authored by Matt Sturgeon and committed by GitHub 6a747a0e 4046e0b8

+62
+62
pkgs/by-name/de/desktoppr/package.nix
···
··· 1 + { 2 + stdenv, 3 + fetchFromGitHub, 4 + fetchpatch, 5 + swift, 6 + swiftpm, 7 + versionCheckHook, 8 + lib, 9 + }: 10 + 11 + stdenv.mkDerivation (finalAttrs: { 12 + pname = "desktoppr"; 13 + version = "0.5"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "scriptingosx"; 17 + repo = "desktoppr"; 18 + tag = "v${finalAttrs.version}"; 19 + hash = "sha256-eEVcYSa1ntyX/Wdj4HUyXyXIrK+T11Thg23ntNoIgH0="; 20 + }; 21 + 22 + patches = [ 23 + # Update version in the code from 0.5b (beta) to 0.5 (release) 24 + (fetchpatch { 25 + url = "https://github.com/scriptingosx/desktoppr/commit/419363c28c99eb0f391bf231813af5e507c35573.patch"; 26 + hash = "sha256-7A3hsXO0hZYlZMrX1U0zC2vy59M9H5OZebEbPY8E9fA="; 27 + includes = [ "desktoppr/main.swift" ]; 28 + }) 29 + # Adds support for building with swiftpm 30 + (fetchpatch { 31 + url = "https://github.com/scriptingosx/desktoppr/commit/eaf08da7cdd5fe9aa656516b3a5a0a9ac9969e72.patch"; 32 + hash = "sha256-8sAUNnTGqQ2UHIFUPwTP0dd3QKgI0HfOrG0HzcIStMM="; 33 + }) 34 + ]; 35 + 36 + nativeBuildInputs = [ 37 + swift 38 + swiftpm 39 + ]; 40 + 41 + installPhase = '' 42 + runHook preInstall 43 + install -Dm755 "$(swiftpmBinPath)/desktoppr" -t "$out/bin" 44 + runHook postInstall 45 + ''; 46 + 47 + nativeInstallCheckInputs = [ 48 + versionCheckHook 49 + ]; 50 + 51 + versionCheckProgramArg = "version"; 52 + doInstallCheck = true; 53 + 54 + meta = { 55 + description = "Simple command line tool to read and set the desktop picture/wallpaper"; 56 + homepage = "https://github.com/scriptingosx/desktoppr"; 57 + platforms = lib.platforms.darwin; 58 + license = lib.licenses.asl20; 59 + maintainers = with lib.maintainers; [ andre4ik3 ]; 60 + mainProgram = "desktoppr"; 61 + }; 62 + })