summaryrefslogtreecommitdiffstats
path: root/jeschli/5pkgs/firefox/rmount/default.nix
blob: 22631f420b05854f890bcf1d0b31d09368c86274 (plain)
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
31
32
33
34
{ stdenv, fetchgit, makeWrapper, lib, pkgs ? import <nixpkgs> {} }:
with pkgs;

stdenv.mkDerivation rec {
  name    = "rmount-${version}";
  version = "1.0.1";
  rev = "v${version}";

  src = fetchgit {
    rev = "9df124780d2e66f01c70afaecf92090669c5ffb6";
    url    = "https://github.com/Luis-Hebendanz/rmount";
    sha256 = "0ydb6sspfnfa3y6gg1r8sk4r58il6636lpqwb2rw7dzmb4b8hpd2";
  };

  buildInputs = [ stdenv makeWrapper ];

  installPhase = ''
    mkdir -p $out/bin
    mkdir -p $out/share/man/man1
    cp ${src}/rmount.man $out/share/man/man1/rmount.1
    cp ${src}/rmount.bash $out/bin/rmount-noenv
    cp ${src}/config.json $out/share/config.json
    chmod +x $out/bin/rmount-noenv

    makeWrapper $out/bin/rmount-noenv $out/bin/rmount \
    --prefix PATH : ${lib.makeBinPath [ nmap jq cifs-utils sshfs ]}
  '';

  meta = {
      homepage = "https://github.com/Luis-Hebendanz/rmount";
      description = "Remote mount utility which parses a json file";
      license = stdenv.lib.licenses.mit;
    };
}