1{ lib, rustPlatform, fetchFromGitHub, pkg-config, libXrandr, libX11 }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "shotgun";
5 version = "2.4.0";
6
7 src = fetchFromGitHub {
8 owner = "neXromancers";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-fcb+eZXzpuEPFSZexbgDpoBX85gsiIqPlcPXruNGenk=";
12 };
13
14 cargoSha256 = "sha256-n5HPl2h0fr0MyGBivNVrrs23HAllIYtwaw1aaKWHCe4=";
15
16 nativeBuildInputs = [ pkg-config ];
17
18 buildInputs = [ libXrandr libX11 ];
19
20 # build script tries to run git to get the current tag
21 postPatch = ''
22 echo "fn main() {}" > build.rs
23 '';
24
25 meta = with lib; {
26 description = "Minimal X screenshot utility";
27 homepage = "https://github.com/neXromancers/shotgun";
28 license = with licenses; [ mpl20 ];
29 maintainers = with maintainers; [ figsoda lumi ];
30 platforms = platforms.linux;
31 };
32}