This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nixpkgsRev = rev: import (builtins.fetchTarball "https://github.com/NixOS/Nixpkgs/archive/${rev}.tar.gz") { | |
config = config.nixpkgs.config; | |
}; | |
master = nixpkgsRev "master"; | |
haskell-fix = nixpkgsRev "69fa2d6bfba"; | |
qt510 = nixpkgsRev "4b649a99d84"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ag --nix python-modules/wxPython --context=10 | |
pkgs/top-level/python-packages.nix | |
14339- doCheck = false; | |
14340- propagatedBuildInputs = with self; [ six webob ]; | |
14341- | |
14342- meta = { | |
14343- maintainers = with maintainers; [ garbas domenkozar ]; | |
14344- }; | |
14345- }; | |
14346- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
superCata :: (Functor f, Foldable f) => (r -> r -> r) -> r -> (f r -> Maybe r) -> Fix f -> r | |
superCata (+) ϵ f = cata algebra where | |
algebra x = fromMaybe (foldr (+) ϵ x) $ f x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hasUsefulRef :: VarName -> NExpr -> Bool | |
hasUsefulRef name = superCata (||) False $ \case | |
NSym name' -> Just $ name == name' | |
NAssert _ x -> Just x | |
_ -> Nothing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prelude Nix.Parser Nix.TH | |
λ> Success ex = parseNixTextLoc "{ inherit a; }" | |
Prelude Nix.Parser Nix.TH | |
λ> freeVars ex | |
fromList [] | |
Prelude Nix.Parser Nix.TH | |
λ> Success ex = parseNixTextLoc "{ inherit a; c = b; }" | |
Prelude Nix.Parser Nix.TH | |
λ> freeVars ex | |
fromList ["b"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desktopManager.xfce = { | |
enable = true; | |
thunarPlugins = with pkgs.xfce; [ | |
thunar-archive-plugin | |
thunar_volman | |
thunar-dropbox-plugin | |
]; | |
# "Don't install XFCE desktop components (xfdesktop, panel and notification | |
# daemon)."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgsRemote = remote: rev: import (builtins.fetchTarball "https://github.com/${remote}/Nixpkgs/archive/${rev}.tar.gz") { | |
config = config.nixpkgs.config; | |
}; | |
remotes = lib.mapAttrs (_: nixpkgsRemote) { | |
upstream = "nixos"; | |
devel = "synthetica9"; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nix-repl> s = { a = 1; } | |
nix-repl> rec { b = 2; inherit (s) a; c = b; } | |
{ a = 1; b = 2; c = 2; } | |
nix-repl> rec { b = 2; } // s // rec { c = b;} | |
error: undefined variable 'b' at (string):1:34 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ> Success e = parseNixText "rec {inherit a;}" | |
λ> freeVars e | |
fromList [] | |
λ> Success e = parseNixText "{inherit a;}" | |
λ> freeVars e | |
fromList ["a"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- /nix/store/a39q29hy3k65ypfbhkv2sq7axsmcnpbd-nixos-system-AquaRing-19.03pre161797.c26dbef830a.drv:{out} | |
+ /nix/store/wshajz6imk1hjwqpiflgrcgqh53hnhps-nixos-system-AquaRing-19.03pre161797.c26dbef830a.drv:{out} | |
• The input named `etc` differs | |
- /nix/store/aiid1f10x4x9hd8h4m8439p04rrm40fq-etc.drv:{out} | |
+ /nix/store/m956vlwmgaj9q7mkcpw5m9wqnwxs63vh-etc.drv:{out} | |
• The input named `etc-nixos.conf` differs | |
- /nix/store/1xqpmqskz77n3p9df1rc6njrl08n3dqf-etc-nixos.conf.drv:{out} | |
+ /nix/store/ma3am349cfl7h40gix9cwmpz4421rsx6-etc-nixos.conf.drv:{out} | |
• The input named `firmware` differs | |
- /nix/store/na9n8mrfrghiv1xxgmjbbnqpib0b3hg6-firmware.drv:{out} |