summaryrefslogtreecommitdiff
path: root/users/gkleen@bragi.nix
blob: e9fdc345d2e3e9049023dd04811e6725e9d8984a (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
  packageOverrides = pkgs: {
    mpv = let mpv = pkgs.mpv.override { youtubeSupport = true; theoraSupport = true; }; in pkgs.stdenv.mkDerivation {
      name = "mpv-wrapper";
      src = mpv;
      unpackPhase = "true";
      buildInputs = [ pkgs.makeWrapper pkgs.rsync ];
      installPhase = ''
        mkdir -p $out
        rsync -a $src/ $out/
        chmod u+w $out/bin
        wrapProgram $out/bin/mpv \
          --set JACK_PROMISCUOUS_SERVER 1 \
          --run "umask 0"
      '';
    };
    jackmeter = let jackmeter = pkgs.jackmeter.override {}; in pkgs.stdenv.mkDerivation {
      name = "jackmeter-wrapper";
      src = jackmeter;
      unpackPhase = "true";
      buildInputs = [ pkgs.makeWrapper pkgs.rsync ];
      installPhase = ''
        mkdir -p $out
        rsync -a $src/ $out/
        chmod u+w $out/bin
        wrapProgram $out/bin/jack_meter \
          --set JACK_PROMISCUOUS_SERVER 1 \
          --run "umask 0"
      '';
    };
    myHaskellPackages = pkgs.recurseIntoAttrs (
      pkgs.haskellPackages.override {
        extension = self: super: let
          callPackage = pkgs.lib.callPackageWith self;
        in {
          attoparsecExpr = callPackage ../custom/attoparsec-expr.nix {};
          shellMonad = callPackage ../custom/shell-monad.nix {};
          beuteltier = callPackage ../custom/beuteltier.nix { fetchgit = pkgs.fetchgit; };
          opossum = callPackage ../custom/opossum.nix { fetchgit = pkgs.fetchgit; };
          opossumWrapper = callPackage ../custom/opossum-wrapper.nix {
            stdenv = pkgs.stdenv;
            makeWrapper = pkgs.makeWrapper;
          };
          wombat = callPackage ../custom/wombat.nix { fetchgit = pkgs.fetchgit; };
          wombatWrapper = pkgs.stdenv.mkDerivation {
            name = "wombat-wrapper";
            src = self.wombat;
            unpackPhase = "true";
            buildInputs = [ pkgs.makeWrapper pkgs.rsync ];
            installPhase = ''
              mkdir -p $out
              rsync -a $src/ $out/
              chmod u+w $out/bin
              wrapProgram $out/bin/wombat \
                --prefix PATH : ${pkgs.ffmpeg}/bin \
                --prefix PATH : ${pkgs.wget}/bin \
                --prefix PATH : ${pkgs.youtube-dl}/bin
            '';
          };
        };
      }
    );
    runOpossum = pkgs.callPackage "../custom/run-opossum@bragi.nix" {
      wombat = myHaskellPackages.wombatWrapper;
      opossum = myHaskellPackages.opossumWrapper;
    };
  };
}