nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchgit,
5 cmake,
6 pkg-config,
7 installShellFiles,
8 libftdi1,
9 popt,
10}:
11
12stdenv.mkDerivation {
13 pname = "sd-mux-ctrl-unstable";
14 version = "2020-02-17";
15
16 src = fetchgit {
17 url = "https://git.tizen.org/cgit/tools/testlab/sd-mux";
18 rev = "9dd189d973da64e033a0c5c2adb3d94b23153d94";
19 hash = "sha256-b0uoxVPfSrqNt0wJoQho9jlpQQUjofgFm93P+UNFtDs=";
20 };
21
22 prePatch = ''
23 substituteInPlace CMakeLists.txt \
24 --replace-fail \
25 'CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)' \
26 'CMAKE_MINIMUM_REQUIRED(VERSION 3.10)'
27 '';
28
29 nativeBuildInputs = [
30 cmake
31 pkg-config
32 installShellFiles
33 ];
34
35 buildInputs = [
36 libftdi1
37 popt
38 ];
39
40 postInstall = ''
41 install -D -m 644 ../doc/man/sd-mux-ctrl.1 $out/share/man/man1/sd-mux-ctrl.1
42 installShellCompletion --cmd sd-mux-ctrl \
43 --bash ../etc/bash_completion.d/sd-mux-ctrl
44 '';
45
46 meta = {
47 description = "Tool for controlling multiple sd-mux devices";
48 homepage = "https://git.tizen.org/cgit/tools/testlab/sd-mux";
49 license = lib.licenses.asl20;
50 maintainers = with lib.maintainers; [
51 newam
52 sarcasticadmin
53 ];
54 platforms = lib.platforms.unix;
55 mainProgram = "sd-mux-ctrl";
56 };
57}