nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchFromGitHub,
3 glib,
4 gtk3,
5 openssl,
6 pkg-config,
7 python3,
8 rustPlatform,
9 lib,
10 wrapGAppsHook3,
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "break-time";
15 version = "0.1.2";
16
17 src = fetchFromGitHub {
18 owner = "cdepillabout";
19 repo = "break-time";
20 rev = "v${version}";
21 sha256 = "sha256-q79JXaBwd/oKtJPvK2+72pY2YvaR3of2CMC8cF6wwQ8=";
22 };
23
24 cargoLock = {
25 lockFile = ./Cargo.lock;
26 };
27
28 nativeBuildInputs = [
29 pkg-config
30 python3 # needed for Rust xcb package
31 wrapGAppsHook3
32 ];
33
34 buildInputs = [
35 glib
36 gtk3
37 openssl
38 ];
39
40 # update Cargo.lock to work with openssl
41 postPatch = ''
42 ln -sf ${./Cargo.lock} Cargo.lock
43 '';
44
45 meta = with lib; {
46 description = "Break timer that forces you to take a break";
47 mainProgram = "break-time";
48 homepage = "https://github.com/cdepillabout/break-time";
49 license = with licenses; [ mit ];
50 maintainers = with maintainers; [ cdepillabout ];
51 platforms = platforms.linux;
52 };
53}