The pkgs.nix:
import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/4df3426f5a5e78cef4835897a43abd9e2a092b74.tar.gz) {}The default.nix:
| { pkgs ? import <nixpkgs> {} }: | |
| with pkgs; | |
| let | |
| inherit (lib) optional optionals; | |
| erlangDrv = { mkDerivation }: | |
| mkDerivation rec { | |
| version = "21.0"; |
This document contains some ideas for additions to the Nix language.
The Nix package manager, Nixpkgs and NixOS currently have several problems:
enableFoo, but there is no way for the Nix
UI to discover them, let alone to provide programmatic ways to$ curl https://nixos.org/nix/install | sh
Found all these from nix-repl. Use builtins.fetchTarball for nixpkgs pinning!
builtins.fetchurl
builtins.fetchTarball
pkgs.fetchFromBitbucket
pkgs.fetchFromGitHub
pkgs.fetchFromGitLab
pkgs.fetchFromRepoOrCz
pkgs.fetchFromSavannah
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 |
| function Get-DirectoryContent { | |
| <# | |
| .SYNOPSIS | |
| Function to get directory content | |
| .EXAMPLE | |
| Get-DirectoryContent -Path "C:\" -HeaderName "poshserver.net" -RequestURL "http://poshserver.net" -SubfolderName "/" | |
| with import <nixpkgs> {}; | |
| stdenv.mkDerivation rec { | |
| name = "env"; | |
| env = buildEnv { name = name; paths = buildInputs; }; | |
| buildInputs = [ | |
| yarn | |
| nodejs-6_x | |
| elixir | |
| postgresql96 |