nix-config: c93e69f494a142945e3969c3fd8069838c483cff

     1: # This one package depends on all of the packages we might want in a user
     2: # profile so we don't need to keep track of everything separately. If you're on
     3: # NixOS you can make these available using /etc/nixos/configuration.nix
     4: # If you're using Nix standalone, or want per-user configuration, you can run
     5: # a command like `nix-env -iA all` to install into your profile.
     6: self: super:
     7: 
     8: with builtins;
     9: with super.lib;
    10: with {
    11:   nonMac  = attrs: if match ".*-darwin" currentSystem == null then attrs else {};
    12:   onlyMac = attrs: if match ".*-darwin" currentSystem == null then {} else attrs;
    13: 
    14:   go = name: paths:
    15:     assert all isDerivation (attrValues paths) || self.die {
    16:       inherit name;
    17:       error   = "Non-derivation in dependencies of meta-package";
    18:       types   = mapAttrs (_: typeOf) paths;
    19:       nonDrvs = mapAttrs (_: typeOf)
    20:                          (filterAttrs (_: x: !(isDerivation x))
    21:                                       paths);
    22:     };
    23:     (if elem name [ "docGui" ]
    24:         then self.lowPrio
    25:         else (x: x))
    26:       (self.buildEnv { inherit name; paths = attrValues paths; });
    27: };
    28: {
    29:   # Packages before a ### are included in the ones after
    30:   overrides = mapAttrs go {
    31:     haskellCli = {
    32:       inherit (self.haskellPackages)
    33:         happy
    34:         pretty-show
    35:         ;
    36:       inherit (self)
    37:         brittany
    38:         cabal-install
    39:         ghc
    40:         ghcid
    41:         haskell-tng
    42:         hlint
    43:         pretty-derivation
    44:         stylish-haskell
    45:         ;
    46:     };
    47: 
    48:     ###
    49: 
    50:     devCli = {
    51:       inherit (self)
    52:         artemis
    53:         asv-nix
    54:         aws-sam-cli
    55:         awscli
    56:         binutils
    57:         coreutils
    58:         direnv
    59:         dvtm
    60:         entr
    61:         file
    62:         gcc
    63:         git
    64:         gnumake
    65:         haskellCli
    66:         jq
    67:         lzip
    68:         niv
    69:         nix-diff
    70:         nix_release
    71:         nix-top
    72:         openjdk
    73:         p7zip
    74:         python
    75:         sbt
    76:         scala
    77:         silver-searcher
    78:         unzip
    79:         vim
    80:         xz
    81:         zip
    82:         ;
    83:         inherit (self.python3Packages)
    84:           black
    85:           ;
    86:     } // onlyMac {
    87:       inherit (self)
    88:         metals
    89:         ;
    90:     } // nonMac {
    91:       inherit (self)
    92:         msgpack-tools
    93:         racket
    94:         xidel
    95:         ;
    96:     };
    97: 
    98:     devGui  = {
    99:       inherit (self)
   100:         emacs
   101:          ;
   102:     } // nonMac {
   103:       inherit (self)
   104:         sqlitebrowser
   105:         ;
   106:     };
   107: 
   108:     docCli = {
   109:       inherit (self)
   110:         anonymousPro
   111:         bibclean
   112:         bibtool
   113:         droid-fonts
   114:         ghostscript
   115:         md2pdf
   116:         poppler_utils
   117:         ;
   118:       aspell = self.aspellWithDicts (dicts: [ dicts.en ]);
   119:     } // nonMac {
   120:       inherit (self)
   121:         pandocPkgs
   122:         ;
   123:     };
   124: 
   125:     docGui = {} // nonMac {
   126:       inherit (self)
   127:         abiword
   128:         basket
   129:         evince
   130:         gnumeric
   131:         gv
   132:         kbibtex_full
   133:         leafpad
   134:         libreoffice
   135:         ;
   136:       mupdf = self.without self.mupdf [ "bin/mupdf-gl" "bin/mupdf-x11-curl" ];
   137:     };
   138: 
   139:     games = {
   140:       inherit (self)
   141:         gensgs
   142:         ;
   143:     };
   144: 
   145:     mediaCli = {
   146:       inherit (self)
   147:         acoustidFingerprinter
   148:         alsaUtils
   149:         get_iplayer
   150:         imagemagick
   151:         ffmpeg
   152:         opusTools
   153:         sox
   154:         youtube-dl
   155:         ;
   156:     };
   157: 
   158:     mediaGui = {
   159:       inherit (self)
   160:         audacious
   161:         cmus
   162:         gimp
   163:         mplayer
   164:         pamixer
   165:         paprefs
   166:         pavucontrol
   167:         picard
   168:         vlc
   169:         ;
   170:     };
   171: 
   172:     netCli = {
   173:       inherit (self)
   174:         aria2
   175:         autossh
   176:         ddgr
   177:         gnutls
   178:         tightvnc
   179:         w3m
   180:         wget
   181:         ;
   182:     } // nonMac {
   183:       inherit (self)
   184:         gcalcli
   185:         msmtp
   186:         mu
   187:         pptp
   188:         sshuttle
   189:         ;
   190:     };
   191: 
   192:     netGui = {
   193:       inherit (self)
   194:         dillo
   195:         firefoxBinary
   196:         uget
   197:         x11vnc
   198:         ;
   199:       pidgin-with-plugins = self.pidgin.override {
   200:         plugins = with self; [
   201:           pidgin-otr
   202:           # We disable gstreamer and farstream by default, to avoid problems
   203:           # with dependencies (e.g. v4l-utils). Our config should fix those, so
   204:           # we should use the unaltered pidgin definition.
   205:           (pidgin-privacy-please.override { overrideGstreamer = false; })
   206:         ];
   207:       };
   208:     };
   209: 
   210:     sysCli = {
   211:       inherit (self.xorg) xmodmap;
   212:       inherit (self)
   213:         acpi
   214:         cifs_utils
   215:         dtach
   216:         exfat
   217:         fuse
   218:         fuse3
   219:         inotify-tools
   220:         libnotify
   221:         openssh
   222:         pciutils
   223:         pmutils
   224:         psmisc
   225:         smbnetfs
   226:         sshfsFuse
   227:         ts
   228:         usbutils
   229:         wmname
   230:         xbindkeys
   231:         xcalib
   232:         xcape
   233:         xpra
   234:         ;
   235:     } // nonMac {
   236:       inherit (self)
   237:         warbo-utilities
   238:         ;
   239:     };
   240: 
   241:     sysGui = self.iconThemes // self.widgetThemes // {
   242:       inherit (self.gnome3) gcr;
   243:       inherit (self.xfce  ) exo xfce4notifyd;
   244:       inherit (self.xorg  ) xkill;
   245:       inherit (self)
   246:         arandr
   247:         asunder
   248:         awf
   249:         blueman
   250:         compton
   251:         gksu
   252:         iotop
   253:         keepassx-community
   254:         lxappearance
   255:         rofi
   256:         st
   257:         trayer
   258:         xsettingsd
   259:         ;
   260:     };
   261: 
   262:     ###
   263: 
   264:     allCli = {
   265:       inherit (self)
   266:         devCli
   267:         docCli
   268:         mediaCli
   269:         netCli
   270:         sysCli
   271:         ;
   272:     };
   273: 
   274:     allGui = {
   275:       inherit (self)
   276:         devGui
   277:         docGui
   278:         games
   279:         mediaGui
   280:         netGui
   281:         sysGui
   282:         ;
   283:     };
   284: 
   285:     ###
   286: 
   287:     allPkgs = {
   288:       inherit (self) allCli allGui;
   289:     };
   290:   };
   291: 
   292:   tests = {
   293:     all      = self.hasBinary self.allPkgs "firefox";
   294:     basic    = self.hasBinary self.allCli  "ssh";
   295:     removals = self.runCommand "removed-undesirables"
   296:       { inherit (self) allPkgs; }
   297:       ''
   298:         FAIL=0
   299:         for F in bin/mupdf-gl bin/mupdf-x11-curl
   300:         do
   301:           if [[ -e "$all/$F" ]]
   302:           then
   303:             FAIL=1
   304:             echo "Found '$F', which should have been removed" 1>&2
   305:           fi
   306:         done
   307:         if [[ "$FAIL" -gt 0 ]]
   308:         then
   309:           echo "Removal didn't work" 1>&2
   310:           exit 1
   311:         fi
   312:         mkdir "$out"
   313:       '';
   314:   };
   315: }

Generated by git2html.