Every Nix derivation produces a Nix store output that has 3 things:
- Executables
- Libraries
- Data
Executables are always exported using the PATH
environment variable. This is pretty much automatic.
/* selected file list item */ | |
.part.sidebar.right.pane-composite-part { | |
border: none !important; | |
} | |
.monaco-workbench .part > .content { | |
width: 100% !important; | |
} | |
/* comments */ |
{...}: { | |
# imports by full path without copying to /nix/store | |
imports = builtins.map (n: toString ./. + "/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./.) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file])); | |
# copies all files from the current directory to /nix/store and imports from /nix/store | |
# imports = builtins.map (n: "${./.}/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./.) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file])); | |
} |
# vim: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent syntax=nix nocompatible : | |
# Containers | |
{ config, pkgs, ... }: | |
{ containers.browser = | |
let hostAddr = "192.168.100.10"; | |
in | |
{ privateNetwork = true; | |
hostAddress = hostAddr; |
local_client | |
server | |
client | |
ext |
nadeem@myznc:~/go/src$ ls -al dummy | |
total 12 | |
drwxrwxr-x 2 nadeem nadeem 4096 Jul 20 18:46 . | |
drwxrwxr-x 6 nadeem nadeem 4096 Jul 20 18:45 .. | |
-rw-rw-r-- 1 nadeem nadeem 129 Jul 20 18:46 hello.go | |
nadeem@myznc:~/go/src/dummy$ cat hello.go | |
// Package dummy contains hello world library. | |
package dummy |
#!/usr/bin/env python3 | |
import sys | |
import json | |
import subprocess | |
direction=bool(sys.argv[1] == 't' or sys.argv[1] == 'T') | |
swaymsg = subprocess.run(['swaymsg', '-t', 'get_tree'], stdout=subprocess.PIPE) | |
data = json.loads(swaymsg.stdout) | |
current = data["nodes"][1]["current_workspace"] |
/** Operators */ | |
const map = (mapper) => (reducer) => (acc, val) => reducer(acc, mapper(val)); | |
const filter = (predicate) => (reducer) => (acc, val) => | |
predicate(val) ? reducer(acc, val) : acc; | |
const some = (predicate) => (_) => (acc, val) => | |
acc !== true ? predicate(val) : true; | |
/** */ |