diff --git a/.gitignore b/.gitignore index 0a9de4d..6a5fbc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -private.nix -displays.nix +private*.nix diff --git a/config-nur.nix b/config-nur.nix index 3934318..8f82ef4 100644 --- a/config-nur.nix +++ b/config-nur.nix @@ -1,32 +1,32 @@ { pkgs -, nur-local ? trace "config-nur nur-local default" ~/nix/nur -, nur-remote ? trace "config-nur nur-remote fetch default" - (builtins.fetchTarball - "https://github.com/nix-community/NUR/archive/master.tar.gz") -, repoOverrides' ? trace "config-nur tryRepoOverrides default" [ +, nur-local ? ~/nix/nur +, nur-remote ? builtins.fetchTarball + "https://github.com/nix-community/NUR/archive/master.tar.gz" +, repoOverrides' ? [ "bb010g" "mozilla" "nexromancers" ] -, repoOverrides ? trace "config-nur repoOverrides default" { +, repoOverrides ? { } , trace ? _: e2: e2 }: let - inherit (builtins) pathExists; + inherit (builtins) mapAttrs pathExists; mapAttrs' = builtins.mapAttrs' or (f: set: builtins.listToAttrs (builtins.map (attr: f attr set.${attr}) (builtins.attrNames set))); - traceMsg' = sep: msg1: msg2: trace (toString msg1 + sep + toString msg2); - traceMsg = traceMsg' " "; - traceVal = msg: e: traceMsg msg e e; nur-path = if nur-local != null && pathExists nur-local then - trace "nur-local ${toString nur-local}" nur-local + nur-local else - trace "nur-remote" nur-remote; - passedArgs = { inherit pkgs; inherit trace; }; + nur-remote; + passedArgs = { + inherit pkgs; + inherit trace; + enablePkgsCompat = false; + }; nur-manifest = (builtins.fromJSON (builtins.readFile (nur-path + "/repos.json"))).repos; @@ -36,19 +36,23 @@ let (builtins.map (repo: { name = repo; value = ~/nix + "/nur-${repo}"; }) repoOverrides')) // repoOverrides; -in trace "importing nur" (import nur-path ({ - pkgs = trace "nur arg pkgs" pkgs; - repoOverrides = mapAttrs' (n: v: traceMsg "override" n (let - p = traceVal "override path" - (v + ("/" + ((nur-manifest.${n} or { }).file or ""))); +in let nur = import nur-path ({ + inherit pkgs; + repoOverrides = mapAttrs' + (n: v: let + p = v + ("/" + ((nur-manifest.${n} or { }).file or "")); in { - name = traceMsg "override pathExists" p - (if pathExists p then n else null); + name = if pathExists p then n else null; value = let - e = traceMsg "override imported" p (import p); + e = import p; in e (builtins.intersectAttrs (builtins.functionArgs e) passedArgs); - })) + }) repoOverrides''; -})) +}); in nur // { + lib = mapAttrs (_: r: r.lib) nur.repos; + modules = mapAttrs (_: r: r.modules) nur.repos; + overlays = mapAttrs (_: r: r.overlays) nur.repos; + pkgs = mapAttrs (_: r: r.pkgs) nur.repos; +} # vim:et:sw=2:tw=78 diff --git a/diff.jq b/diff.jq old mode 100644 new mode 100755 index 3583391..1460029 --- a/diff.jq +++ b/diff.jq @@ -1,3 +1,8 @@ +#!/usr/bin/env bash +# Copyright 2019 bb010g \ +exec jq -nr --slurpfile orig <(git show HEAD:nix/sources.json) --slurpfile new nix/sources.json -f "$0" +# SPDX-License-Identifier: ISC OR Apache-2.0 + def zip(f; g; default): . as $xs | to_entries as $xs_entries | @@ -83,4 +88,4 @@ $new[0] as $new | ) )) -# vim:et:sw=2:tw=78 +# vim:ft=jq:et:sw=2:tw=78 diff --git a/home.nix b/home.nix index 365e4a7..79e081c 100644 --- a/home.nix +++ b/home.nix @@ -19,12 +19,6 @@ let # might also have some personal patches? # if so, they'd be up at https://github.com/bb010g/nixpkgs, branch bb010g-* - private = trace "home private" (if lib.pathExists ./private.nix then - trace "home private imported" (import ./private.nix) - else - trace "home private default" { - apis = { }; - }); sources = trace "home sources" (import ./nix/sources.nix); pinned = trace "home pinned" (let p = if args ? "pinned" then @@ -75,8 +69,9 @@ let in { imports = let - bb010g = nur.repos.bb010g.modules.home-manager; + bb010g = nur.modules.bb010g.home-manager; in trace "home imports" [ + ./private-home.nix bb010g.programs.pijul ]; @@ -187,7 +182,7 @@ in fonts-emoji = [ # fontconfig-emoji # needs global installation - pkgs.nur.repos.bb010g.mutant-standard + pkgs.nur.pkgs.bb010g.mutant-standard pkgs-unstable.noto-fonts-emoji pkgs-unstable.twitter-color-emoji ]; @@ -211,12 +206,12 @@ in misc = [ pkgs-unstable.bitwarden-cli - pkgs.nur.repos.bb010g.broca-unstable + pkgs.nur.pkgs.bb010g.broca-unstable pkgs.cowsay - pkgs-unstable.nur.repos.bb010g.edbrowse + pkgs-unstable.nur.pkgs.bb010g.edbrowse pkgs.elinks pkgs.fortune - # pkgs-unstable.nur.repos.bb010g.html2json-unstable + # pkgs-unstable.nur.bb010g.html2json-unstable pkgs.lynx pkgs.megatools pkgs.ponysay @@ -231,7 +226,7 @@ in ((pkgs.diffoscope.override { enableBloat = true; }).overrideAttrs (o: { pythonPath = o.pythonPath ++ [ pkgs.zip ]; })) - pkgs.lorri + pkgs.lorri-unstable pkgs.niv.niv pkgs-unstable.nix-diff pkgs-unstable.nix-index @@ -240,7 +235,7 @@ in pkgs-unstable.nix-top pkgs-unstable.nix-universal-prefetch pkgs-unstable.vulnix - pkgs.yarn2nix + pkgs.yarn2nix-moretea.yarn2nix # TODO figure out how to build nixpkgs manual ]; @@ -258,10 +253,10 @@ in pkgs.colordiff pkgs.cv pkgs.diffstat - pkgs.nur.repos.bb010g.dwdiff + pkgs.nur.pkgs.bb010g.dwdiff pkgs.gitAndTools.git-imerge - pkgs.nur.repos.bb010g.git-my - pkgs.nur.repos.bb010g.git-revise + pkgs.nur.pkgs.bb010g.gitAndTools.git-my + pkgs.nur.pkgs.bb010g.gitAndTools.git-revise pkgs.gnumake pkgs.hecate pkgs-unstable.hyperfine @@ -270,7 +265,7 @@ in pkgs.ispell pkgs-unstable.just pkgs.lzip - pkgs-unstable.nur.repos.bb010g.mosh-unstable + pkgs-unstable.nur.pkgs.bb010g.mosh-unstable pkgs.ngrok pkgs.p7zip pkgs.ponymix @@ -278,9 +273,9 @@ in pkgs.sbcl pkgs-unstable.sublime-merge pkgs.tokei - pkgs.nur.repos.bb010g.ttyd + pkgs.nur.pkgs.bb010g.ttyd pkgs.unzip - pkgs.nur.repos.bb010g.ydiff + pkgs.nur.pkgs.bb010g.ydiff ]; gui = lib.concatLists [ @@ -301,7 +296,7 @@ in pkgs-unstable.nur.repos.nexromancers.hacksaw pkgs.hicolor-icon-theme pkgs-unstable.nur.repos.nexromancers.shotgun - pkgs.nur.repos.bb010g.st-bb010g-unstable + pkgs.nur.pkgs.bb010g.st-bb010g-unstable pkgs.xsel ]; @@ -320,7 +315,7 @@ in pkgs.evince pkgs.geeqie pkgs.gimp - pkgs-unstable-bb010g.grafx2 + pkgs-unstable-bb010g.pkgs.grafx2 pkgs.inkscape pkgs.kdeApplications.kolourpaint pkgs.krita @@ -336,33 +331,11 @@ in gui-misc = [ pkgs-unstable.discord - ((pkgs.nur.repos.mozilla.lib.firefoxOverlay.firefoxVersion { - name = "Firefox Nightly"; - # https://product-details.mozilla.org/1.0/firefox_versions.json - # : FIREFOX_NIGHTLY - inherit (sources.firefox-nightly) version; - # system: ? arch (if stdenv.system == "i686-linux" then "linux-i686" else "linux-x86_64") - # https://download.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-${version}.en-US.${system}.buildhub.json - # : download -> url -> (parse) - # - https://archive.mozilla.org/pub/firefox/nightly/%Y/%m/%Y-%m-%d-%H-%m-%s-mozilla-central/firefox-${version}.en-US.${system}.tar.bz2 - # : build -> date -> (parse) also works - # - %Y-%m-%dT%H:%m:%sZ - # need %Y-%m-%d-%H-%m-%s - inherit (sources.firefox-nightly) timestamp; - release = false; - }).overrideAttrs (o: { - buildCommand = lib.replaceStrings [ '' - --set MOZ_SYSTEM_DIR "$out/lib/mozilla" \ - '' ] [ '' - --set MOZ_SYSTEM_DIR "$out/lib/mozilla" \ - --set SNAP_NAME firefox \ - '' ] o.buildCommand; - })) pkgs.google-chrome pkgs.gucharmap pkgs.keybase-gui # for Firefox MozLz4a JSON files (.jsonlz4) - pkgs-unstable.nur.repos.bb010g.mozlz4-tool + pkgs-unstable.nur.pkgs.bb010g.mozlz4-tool (pkgs-unstable.qutebrowser.overrideAttrs (o: { buildInputs = o.buildInputs ++ hunspellDicts; })) @@ -378,7 +351,7 @@ in pkgs.freerdp pkgs.gnome3.gnome-system-monitor pkgs.ksysguard - pkgs-unstable-bb010g.nur.repos.bb010g.ipscan + # pkgs-unstable-bb010g.nur.pkgs.bb010g.ipscan pkgs.notify-desktop pkgs.pavucontrol pkgs.pcmanfm @@ -387,7 +360,7 @@ in pkgs.sqlitebrowser pkgs.surf pkgs.wireshark - pkgs-unstable.nur.repos.bb010g.xcolor + pkgs-unstable.nur.pkgs.bb010g.xcolor pkgs.xorg.xbacklight ]; in lib.concatLists [ @@ -404,13 +377,14 @@ in home.sessionVariables = { EDITOR = "ed"; - ${if lib.hasAttrByPath [ "apis" "github" "env-token" ] private - then "GITHUB_TOKEN" else null} = private.apis.github.env-token; + # GITHUB_TOKEN = in ./private-home.nix NIX_PATH = "${config.home.homeDirectory}/nix/channels:$NIX_PATH"; PAGER = "less -RF"; VISUAL = "nvim"; }; + home.stateVersion = "19.09"; + manual = { html.enable = true; manpages.enable = true; @@ -419,6 +393,7 @@ in programs.autorandr = { enable = true; profiles = let + # TODO: refactor to use modules and `config` genProfiles = displays: lib.mapAttrs (name: value: value // { fingerprint = lib.mapAttrs' (n: _: { name = displays.${n}.output; value = displays.${n}.fingerprint; @@ -428,7 +403,7 @@ in }) value.config; }); # { = { output = ""; fingerprint = "…"; config = {…}; … }; … } - displays = import ./displays.nix; + displays = import ./private-displays.nix; in genProfiles displays { mobile.config = { laptop = { }; @@ -447,22 +422,11 @@ in programs.beets = { enable = true; package = pkgs-unstable.beets; - settings = let - optionalPlugin = p: let cond = private.apis ? ${p}; in { - plugin = lib.optional cond p; - name = if cond then p else null; - value = private.apis.${p} or null; - }; - - acoustid = optionalPlugin "acoustid"; - discogs = optionalPlugin "discogs"; - - hasPrivatePath = p: lib.hasAttrByPath p private; - googlePath = [ "google" "personal" "beetsKey" ]; - in { + settings = { plugins = [ # autotagger "chroma" + "discogs" "fromfilename" # metadata # "absubmit" (needs streaming_music_extractor) @@ -488,14 +452,9 @@ in "info" "mbsubmit" "missing" - ] ++ lib.concatLists [ - # autotagger - discogs.plugin ]; - ${acoustid.name} = { - apikey = acoustid.value; - }; + # acoustid.apikey = in ./private-home.nix; badfiles = { commands = { }; @@ -509,13 +468,8 @@ in }; }; }; - ${discogs.name} = { - user_token = discogs.value; - }; - lyrics = { - ${if hasPrivatePath googlePath then "google_API_key" else null} = - lib.getAttrByPath googlePath private; - }; + # discogs.user_token = in ./private-home.nix; + # lyrics.google_API_key = in ./private-home.nix; paths = { "default" = "%the{$albumartist}/%the{$album}%aunique{}/$track $title"; "singleton" = "Non-Album/%the{$artist}/$title"; @@ -536,11 +490,32 @@ in programs.feh = { enable = true; }; - # programs.firefox = { - # enable = true; - # package = moz_nixpkgs.latest.firefox-nightly-bin; - # enableAdobeFlash = true; - # }; + programs.firefox = { + enable = true; + package = ((pkgs.nur.lib.mozilla.firefoxOverlay.firefoxVersion { + name = "Firefox Nightly"; + # https://product-details.mozilla.org/1.0/firefox_versions.json + # : FIREFOX_NIGHTLY + inherit (sources.firefox-nightly) version; + # system: ? arch (if stdenv.system == "i686-linux" then "linux-i686" else "linux-x86_64") + # https://download.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-${version}.en-US.${system}.buildhub.json + # : download -> url -> (parse) + # - https://archive.mozilla.org/pub/firefox/nightly/%Y/%m/%Y-%m-%d-%H-%m-%s-mozilla-central/firefox-${version}.en-US.${system}.tar.bz2 + # : build -> date -> (parse) also works + # - %Y-%m-%dT%H:%m:%sZ + # need %Y-%m-%d-%H-%m-%s + inherit (sources.firefox-nightly) timestamp; + release = false; + }).overrideAttrs (o: { + buildCommand = lib.replaceStrings [ '' + --set MOZ_SYSTEM_DIR "$out/lib/mozilla" \ + '' ] [ '' + --set MOZ_SYSTEM_DIR "$out/lib/mozilla" \ + --set SNAP_NAME firefox \ + '' ] o.buildCommand; + })); + enableAdobeFlash = true; + }; programs.git = { enable = true; @@ -601,8 +576,7 @@ in in { enable = true; package = nvimUnwrapped; - configure = { - customRC = /*vim*/'' + extraConfig = /*vim*/'' "" general mappings (set before other uses) " let mapleader = "\" @@ -666,69 +640,64 @@ nmap :call TermOpen() " cursor line margin (so siso) set scrolloff=5 sidescrolloff=4 - ''; - packages."plugins-bb010g" = let - inherit (pkgsNvim.vimUtils.override { vim = nvim; }) buildVimPluginFrom2Nix; - basicVimPlugin = pname: version: src: - buildVimPluginFrom2Nix { - pname = lib.removePrefix "vim-" pname; - inherit version src; - }; - sourcesVimPlugin = pname: let - src = sources.${pname}; - date = lib.elemAt (builtins.split "T" src.date) 0; - in basicVimPlugin pname date src; - - vim-sved = (sourcesVimPlugin "vim-sved").overrideAttrs(o: { - patches = sources.vim-sved.patches or [] ++ [ - (builtins.toFile "nvim-host-python.patch" /*diff*/'' + ''; + plugins = let + inherit (pkgsNvim.vimUtils.override { vim = nvim; }) buildVimPluginFrom2Nix; + basicVimPlugin = pname: version: src: + buildVimPluginFrom2Nix { + pname = lib.removePrefix "vim-" pname; + inherit version src; + }; + sourcesVimPlugin = pname: let + src = sources.${pname}; + date = lib.elemAt (builtins.split "T" src.date) 0; + in basicVimPlugin pname date src; + + vim-sved = (sourcesVimPlugin "vim-sved").overrideAttrs(o: { + patches = sources.vim-sved.patches or [] ++ [ + (builtins.toFile "nvim-host-python.patch" /*diff*/'' --- a/ftplugin/tex_evinceSync.vim +++ b/ftplugin/tex_evinceSync.vim @@ -39,2 +39,2 @@ if has("nvim") - let g:evinceSyncDaemonJob = jobstart([s:pycmd, "1"], + let g:evinceSyncDaemonJob = jobstart([g:python_host_prog, s:pycmd, "1"], - '') - ]; - }); - in { - start = map sourcesVimPlugin [ - "vim-ale" - "vim-caw" - "vim-characterize" - "vim-context-filetype" - "vim-diffchar" - "vim-dirdiff" - "vim-dirvish" - "vim-editorconfig" - "vim-exchange" - "vim-gina" - "vim-linediff" - "vim-lion" - "vim-magnum" - "vim-operator-user" - "vim-polyglot" - "vim-precious" - "vim-radical" - "vim-recover" - "vim-remote-viewer" - "vim-repeat" - "vim-sandwich" - "vim-startuptime" - "vim-suckless" - "vim-suda" - "vim-table-mode" - "vim-targets" - "vim-termopen" - "vim-undotree" - "vim-visualrepeat" - ] ++ [ - vim-sved - ]; - opt = map sourcesVimPlugin [ + '') ]; - }; - }; + }); + in map sourcesVimPlugin [ + "vim-ale" + "vim-caw" + "vim-characterize" + "vim-context-filetype" + "vim-diffchar" + "vim-dirdiff" + "vim-dirvish" + "vim-editorconfig" + "vim-exchange" + "vim-gina" + "vim-linediff" + "vim-lion" + "vim-magnum" + "vim-operator-user" + "vim-polyglot" + "vim-precious" + "vim-radical" + "vim-recover" + "vim-remote-viewer" + "vim-repeat" + "vim-sandwich" + "vim-startuptime" + "vim-suckless" + "vim-suda" + "vim-table-mode" + "vim-targets" + "vim-termopen" + "vim-undotree" + "vim-visualrepeat" + ] ++ [ + vim-sved + ]; }; programs.obs-studio = { @@ -1049,19 +1018,16 @@ first((. as $p | $drvs | keys_unsorted[] | . as $k | }; }; - services.redshift = - if private ? redshift then trace "redshift private" - (with private.redshift; { - enable = true; - tray = true; - inherit latitude; - inherit longitude; - temperature = { - day = 6500; - night = 3700; - }; - }) - else "redshift default" { }; + services.redshift = { + enable = true; + tray = true; + # latitude = in ./private-home.nix; + # longitude = in ./private-home.nix; + temperature = { + day = 6500; + night = 3700; + }; + }; services.screen-locker = { enable = true; @@ -1085,7 +1051,7 @@ first((. as $p | $drvs | keys_unsorted[] | . as $k | Type = "simple"; Environment = [ "RUST_BACKTRACE=1" ]; ExecStart = [ - "${pkgs.nur.repos.bb010g.broca-unstable}/bin/broca-daemon" + "${pkgs.nur.pkgs.bb010g.broca-unstable}/bin/broca-daemon" ]; WorkingDirectory = "%h"; Restart = "always"; @@ -1207,4 +1173,4 @@ keep-outputs = true }; } -# vim:et:sw=2:tw=78 +# vim:ft=nix:et:sw=2:tw=78 diff --git a/nix/sources.json b/nix/sources.json index de83ec9..1727fa3 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,26 +1,24 @@ { "firefox-nightly": { - "buildhub_url": "https://download.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-71.0a1.en-US.linux-x86_64.buildhub.json", + "buildhub_url": "https://download.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/firefox-72.0a1.en-US.linux-x86_64.buildhub.json", "buildhub_url_template": "https://download.cdn.mozilla.net/pub/firefox/nightly/latest-mozilla-central/.buildhub.json", - "date": "2019-10-19", - "date_d": "19", + "date": "2019-10-30", + "date_d": "30", "date_m": "10", "date_template": "--", "date_y": "2019", - "download_url": "https://archive.mozilla.org/pub/firefox/nightly/2019/10/2019-10-19-09-53-21-mozilla-central/firefox-71.0a1.en-US.linux-x86_64.tar.bz2", - "download_url_template": "https://archive.mozilla.org/pub/firefox/nightly///-mozilla-central/firefox-71.0a1.en-US.linux-x86_64.tar.bz2", "locale": "en-US", "sha256": "08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm", - "slug": "firefox-71.0a1.en-US.linux-x86_64", + "slug": "firefox-72.0a1.en-US.linux-x86_64", "slug_template": "firefox-..", "system": "linux-x86_64", - "timestamp": "2019-10-19-09-53-21", + "timestamp": "2019-10-30-05-03-08", "timestamp_template": "-", - "timestamp_time": "09-53-21", + "timestamp_time": "05-03-08", "type": "builtin-url", - "url": "https://example.com/index.html", - "url_template": "https://example.com/index.html", - "version": "71.0a1", + "url": "https://archive.mozilla.org/pub/firefox/nightly/2019/10/2019-10-30-05-03-08-mozilla-central/firefox-72.0a1.en-US.linux-x86_64.tar.bz2", + "url_template": "https://archive.mozilla.org/pub/firefox/nightly///-mozilla-central/firefox-72.0a1.en-US.linux-x86_64.tar.bz2", + "version": "72.0a1", "versions_url": "https://product-details.mozilla.org/1.0/firefox_versions.json" }, "fontconfig-emoji": { @@ -77,67 +75,67 @@ }, "lorri": { "branch": "rolling-release", - "date": "2019-08-20T14:44:02Z", + "date": "2019-10-30T15:25:41Z", "description": "Your project's nix-env", "homepage": "", "owner": "target", "repo": "lorri", - "rev": "38eae3d487526ece9d1b8c9bb0d27fb45cf60816", - "sha256": "11k9lxg9cv6dlxj4haydvw4dhcfyszwvx7jx9p24jadqsy9jmbj4", + "rev": "03f10395943449b1fc5026d3386ab8c94c520ee3", + "sha256": "0fcl79ndaziwd8d74mk1lsijz34p2inn64b4b4am3wsyk184brzq", "type": "tarball", - "url": "https://github.com/target/lorri/archive/38eae3d487526ece9d1b8c9bb0d27fb45cf60816.tar.gz", + "url": "https://github.com/target/lorri/archive/03f10395943449b1fc5026d3386ab8c94c520ee3.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "lorri-unstable": { "branch": "master", - "date": "2019-10-07T15:06:02Z", + "date": "2019-10-30T13:50:19Z", "description": "Your project's nix-env", "homepage": "", "owner": "target", "repo": "lorri", - "rev": "d05f00a84f887b042c8feceb2c29bbdec438c9e6", - "sha256": "1rhykd65a6zh4ak3z0hz0hbg91ifc6q7lcfyqhdd8w72ywsx3kaw", + "rev": "3e57dcd58c337285f63bba2d6d181800206fb1f0", + "sha256": "1g1vbg5di2g7fzglz6xqlkl351p1s5ziciv4bwbigd7i0526l6my", "type": "tarball", - "url": "https://github.com/target/lorri/archive/d05f00a84f887b042c8feceb2c29bbdec438c9e6.tar.gz", + "url": "https://github.com/target/lorri/archive/3e57dcd58c337285f63bba2d6d181800206fb1f0.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "niv": { "branch": "master", - "date": "2019-09-23T20:57:43Z", + "date": "2019-10-30T15:46:46Z", "description": "Easy dependency management for Nix projects", "homepage": "https://github.com/nmattia/niv", "owner": "nmattia", "repo": "niv", - "rev": "1dd094156b249586b66c16200ecfd365c7428dc0", - "sha256": "1b2vjnn8iac5iiqszjc2v1s1ygh0yri998c0k3s4x4kn0dsqik21", + "rev": "88d6f20882b0422470acbcbf2d1b5f07e1d436f0", + "sha256": "0wkvz4drnglmmdrz8q1i1yr2fqizpf96k1wq2rlhd8l8x1522izq", "type": "tarball", - "url": "https://github.com/nmattia/niv/archive/1dd094156b249586b66c16200ecfd365c7428dc0.tar.gz", + "url": "https://github.com/nmattia/niv/archive/88d6f20882b0422470acbcbf2d1b5f07e1d436f0.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "nixos-19.03", - "date": "2019-10-07T13:48:50Z", + "branch": "nixos-19.09", + "date": "2019-10-27T16:40:06Z", "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", "homepage": null, "owner": "NixOS", "repo": "nixpkgs-channels", - "rev": "0e0ee084d6dfc83b5b67b6cbcefe43664114808d", - "sha256": "1qk0ag4ihfjh9ay28hc9zf9vnrdw096driirv62picyn30j9y0l3", + "rev": "c75de8bc12cc7e713206199e5ca30b224e295041", + "sha256": "1awipcjfvs354spzj2la1nzmi9rh2ci2mdapzf4kkabf58ilra6x", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs-channels/archive/0e0ee084d6dfc83b5b67b6cbcefe43664114808d.tar.gz", + "url": "https://github.com/NixOS/nixpkgs-channels/archive/c75de8bc12cc7e713206199e5ca30b224e295041.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs-unstable": { "branch": "nixos-unstable", - "date": "2019-09-25T06:02:27Z", + "date": "2019-10-23T18:19:15Z", "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", "homepage": null, "owner": "NixOS", "repo": "nixpkgs-channels", - "rev": "2436c27541b2f52deea3a4c1691216a02152e729", - "sha256": "0p98dwy3rbvdp6np596sfqnwlra11pif3rbdh02pwdyjmdvkmbvd", + "rev": "4cd2cb43fb3a87f48c1e10bb65aee99d8f24cb9d", + "sha256": "1d6rmq67kdg5gmk94wx2774qw89nvbhy6g1f2lms3c9ph37hways", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs-channels/archive/2436c27541b2f52deea3a4c1691216a02152e729.tar.gz", + "url": "https://github.com/NixOS/nixpkgs-channels/archive/4cd2cb43fb3a87f48c1e10bb65aee99d8f24cb9d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs-unstable-bb010g": { diff --git a/nix/sources.nix b/nix/sources.nix index 7a9a2ae..d4ac577 100644 --- a/nix/sources.nix +++ b/nix/sources.nix @@ -47,6 +47,10 @@ with rec # annoyingly this means we have to specify them fetchzip = { url, sha256 }@attrs: pkgs.fetchzip attrs; + # A wrapper around pkgs.fetchurl that has inspectable arguments, + # annoyingly this means we have to specify them + fetchurl = { url, sha256 }@attrs: pkgs.fetchurl attrs; + hasNixpkgsPath = (builtins.tryEval ).success; hasThisAsNixpkgsPath = (builtins.tryEval ).success && == ./.; @@ -71,7 +75,7 @@ with rec in builtins.getAttr fetcherName { "tarball" = fetchzip; "builtin-tarball" = builtins_fetchTarball; - "file" = pkgs.fetchurl; + "file" = fetchurl; "builtin-url" = builtins_fetchurl; }; };