- Package search (for stable channel)
- An unofficial multi-channel package search (for all recent channels, including stable - currently not being updated)
- Options search (for stable channel)
- A list of channels, and when they were last updated
- A timeline of channel builds
- A source code search (that actually works!) of all NixOS repositories; Nix, nixpkgs, etc.
| Uninstalling nix: | |
| 1. Delete /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
| sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
| sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
| 2. Restore /etc/profile.backup-before-nix back to /etc/profile | |
| sudo mv /etc/profile.backup-before-nix /etc/profile |
| self: super: let | |
| mkXDG = import ../xdg.nix; | |
| in | |
| { | |
| wget = mkXDG { | |
| pname = "wget"; | |
| pkg = super.wget; | |
| mods = { cache }: { | |
| wget.flags = "--hsts-file=${cache}/hsts"; |
GHC API lets you process Haskell sources, and (among other) specify code generation and linking level. For example:
- (1) no codegen & no link
- (2) bytecode generation & link in memory
- (3) machine code generation & linking output binaries
For code analysis purposes, based on generating the typechecked AST, option (1) suffices most of the time. There are some situations in which it doesn't:
- TemplateHaskell (TH) splice needs to execute code (at compile time) from an imported module: the imported module must be available in compiled form, so either (2) or (3) is needed. Example: in
$([|$(foo)|]),foowill be evaluated at compile-time. - Code uses FFI imports. For this one would expect that (2) is needed (see
checkCOrAsmOrLlvmOrInterpinTcForeign.hs), but actually unless it is used (say by TH, see below), even (1) works too (see the wrappercheckCg).
| { system ? builtins.currentSystem }: | |
| # In order to update `nixpkgs.json` to a specific revision, run: | |
| # | |
| # ```bash | |
| # $ nix-prefetch-git https://github.com/NixOS/nixpkgs.git "${REVISION}" > nixpkgs.json | |
| # ``` | |
| with rec { | |
| builtin-paths = import <nix/config.nix>; |
Lower precedence means a stronger binding; ie. this list is sorted from strongest to weakest binding, and in the case of equal precedence between two operators, the associativity decides the binding.
| Prec | Abbreviation | Example | Assoc | Description |
|---|---|---|---|---|
| 1 | SELECT | e . attrpath [or def] |
none | Select attribute denoted by the attribute path attrpath from set e. (An attribute path is a dot-separated list of attribute names.) If the attribute doesn’t exist, return default if provided, otherwise abort evaluation. |
| 2 | APP | e1 e2 |
left | Call function e1 with argument e2. |
| 3 | NEG | -e |
none | Numeric negation. |
| 4 | HAS_ATTR | e ? attrpath |
none | Test whether set e contains the attribute denoted by attrpath; return true or false. |
| 5 | CONCAT | e1 ++ e2 |
right | List concatenation. |
| 6 | MUL | e1 * e2 |
le |
| { pkgs ? import <nixpkgs> { } }: | |
| with pkgs; | |
| stdenv.mkDerivation rec { | |
| name = "gnome-builder-${version}"; | |
| version = "3.25.2-a11c9dfa"; | |
| buildInputs = [ | |
| libxml2 desktop_file_utils llvm clang libgit2 gobjectIntrospection librsvg |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DefaultSignatures #-} | |
| {-# LANGUAGE DeriveAnyClass #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE NamedFieldPuns #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE RecordWildCards #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} |
this has been rewritten yet again as most workarounds aren't required anymore since wine 3+
example video of the final result: https://www.youtube.com/watch?v=zkqzQoeOGfU
with touchscreen: https://www.youtube.com/watch?v=GcIrlorWmaQ
performance is indistinguishable from windows. there might be a very slight ~25ms sound latency which is easily compensated with +25 local offset
tested on
-
nix-channeland~/.nix-defexprare gone. We'll use$NIX_PATH(or user environment specific overrides configured vianix set-path) to look up packages. Since$NIX_PATHsupports URLs nowadays, this removes the need for channels: you can just set$NIX_PATHto e.g.https://nixos.org/channels/nixos-15.09/nixexprs.tar.xzand stay up to date automatically. -
By default, packages are selected by attribute name, rather than the
nameattribute. Thusnix install hellois basically equivalent tonix-env -iA hello. The attribute name is recorded in the user environment manifest and used in upgrades. Thus (at least by default)hellowon't be upgraded tohelloVariant.@vcunat suggested making this an arbitrary Nix expression rather than an attrpath, e.g.
firefox.override { enableFoo = true; }. However, such an expression would not have a key in the user environment, unlike an attrpath. Better to require an explicit flag for this.
TBD: How to deal with search path clashes.