summary refs log tree commit diff
path: root/pkgs/tools/misc/0x0/default.nix
blob: 39cfcefaee8afb46c9327b26979191cc9d9907d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib, stdenv, xsel, curl, fetchFromGitLab, makeWrapper}:

stdenv.mkDerivation {
  pname = "0x0";
  version = "2018-06-24";

  src = fetchFromGitLab {
    owner = "somasis";
    repo = "scripts";
    rev  = "70422c83b2ac5856559b0ddaf6e2dc3dbef40dee";
    sha256 = "1qpylyxrisy3p2lyirfarfj5yzrdjgsgxwf8gqwljpcjn207hr72";
  };

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    install -Dm755 0x0 $out/bin/0x0

    patchShebangs $out/bin/0x0
    wrapProgram $out/bin/0x0 \
      --prefix PATH : '${lib.makeBinPath [ curl xsel ]}'
  '';

  meta = with lib; {
    description = "A client for 0x0.st";
    homepage = "https://gitlab.com/somasis/scripts/";
    maintainers = [ maintainers.ar1a ];
    license = licenses.unlicense;
  };
}