Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 58 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 rustPlatform, 6 just, 7 pkg-config, 8 nixosTests, 9}: 10 11rustPlatform.buildRustPackage (finalAttrs: { 12 pname = "cosmic-screenshot"; 13 version = "1.0.0-alpha.7"; 14 15 # nixpkgs-update: no auto update 16 src = fetchFromGitHub { 17 owner = "pop-os"; 18 repo = "cosmic-screenshot"; 19 tag = "epoch-${finalAttrs.version}"; 20 hash = "sha256-VvU/9vYdoTvy3yzdeXrhKrtS9tUHMKnaSAeNTEKk5PA="; 21 }; 22 23 cargoHash = "sha256-1r0Uwcf4kpHCgWqrUYZELsVXGDzbtbmu/WFeX53fBiQ="; 24 25 nativeBuildInputs = [ 26 just 27 pkg-config 28 ]; 29 30 dontUseJustBuild = true; 31 32 justFlags = [ 33 "--set" 34 "prefix" 35 (placeholder "out") 36 "--set" 37 "bin-src" 38 "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-screenshot" 39 ]; 40 41 passthru.tests = { 42 inherit (nixosTests) 43 cosmic 44 cosmic-autologin 45 cosmic-noxwayland 46 cosmic-autologin-noxwayland 47 ; 48 }; 49 50 meta = with lib; { 51 homepage = "https://github.com/pop-os/cosmic-screenshot"; 52 description = "Screenshot tool for the COSMIC Desktop Environment"; 53 license = licenses.gpl3Only; 54 teams = [ teams.cosmic ]; 55 platforms = platforms.linux; 56 mainProgram = "cosmic-screenshot"; 57 }; 58})