nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 60 lines 1.4 kB view raw
1{ 2 fetchFromGitHub, 3 installShellFiles, 4 lib, 5 pkg-config, 6 rustPlatform, 7 stdenv, 8 withSixel ? false, 9 libsixel, 10 xorg, 11 withSki ? true, 12}: 13 14rustPlatform.buildRustPackage rec { 15 pname = "menyoki"; 16 version = "1.7.0"; 17 18 src = fetchFromGitHub { 19 owner = "orhun"; 20 repo = "menyoki"; 21 rev = "v${version}"; 22 sha256 = "sha256-owP3G1Rygraifdc4iPURQ1Es0msNhYZIlfrtj0CSU6Y="; 23 }; 24 25 cargoHash = "sha256-6FRc/kEhGJXIZ+6GXeYj5j7QVmvZgIQgtDPvt94hlho="; 26 27 nativeBuildInputs = [ installShellFiles ] ++ lib.optional stdenv.hostPlatform.isLinux pkg-config; 28 29 buildInputs = 30 lib.optional withSixel libsixel 31 ++ lib.optionals stdenv.hostPlatform.isLinux ( 32 with xorg; 33 [ 34 libX11 35 libXrandr 36 ] 37 ); 38 39 buildNoDefaultFeatures = !withSki; 40 buildFeatures = lib.optional withSixel "sixel"; 41 42 checkFlags = [ 43 # sometimes fails on lower end machines 44 "--skip=record::fps::tests::test_fps" 45 ]; 46 47 postInstall = '' 48 installManPage man/* 49 installShellCompletion completions/menyoki.{bash,fish,zsh} 50 ''; 51 52 meta = { 53 description = "Screen{shot,cast} and perform ImageOps on the command line"; 54 homepage = "https://menyoki.cli.rs/"; 55 changelog = "https://github.com/orhun/menyoki/blob/v${version}/CHANGELOG.md"; 56 license = lib.licenses.gpl3Only; 57 maintainers = with lib.maintainers; [ figsoda ]; 58 mainProgram = "menyoki"; 59 }; 60}