summary refs log tree commit diff
path: root/pkgs/tools/system/setserial/default.nix
blob: 76bc24c27562caf62005ba0ec53901a7cac250b5 (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
31
32
33
34
a :  
let 
  fetchurl = a.fetchurl;

  version = a.lib.attrByPath ["version"] "2.17" a; 
  buildInputs = with a; [
    groff
  ];
in
rec {
  src = fetchurl {
    url = "mirror://sourceforge/setserial/setserial-${version}.tar.gz";
    sha256 = "0jkrnn3i8gbsl48k3civjmvxyv9rbm1qjha2cf2macdc439qfi3y";
  };

  inherit buildInputs;
  configureFlags = [];

  installFlags = "DESTDIR=$out";

  /* doConfigure should be removed if not needed */
  phaseNames = ["doConfigure" "patchPath" "doMakeInstall"];

  patchPath = a.fullDepEntry (''
    sed -e s@/usr/man/@/share/man/@ -i Makefile
  '') ["minInit" "doUnpack" "doConfigure"];

  neededDirs = ["$out/bin" "$out/share/man/man8"];
      
  name = "setserial-" + version;
  meta = {
    description = "Serial port configuration utility";
  };
}