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
| with import <nixpkgs> { system = "i686-linux"; }; | |
| runCommandCC "filename" { buildInputs = [ gcc ]; } '' | |
| cat <<EOF > $out | |
| #!${stdenv.shell} | |
| patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${lib.makeLibraryPath [ zlib ]} \$1 | |
| EOF | |
| chmod +x $out | |
| '' |
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 | |
| Welcome to Nix version 1.11.7. Type :? for help. | |
| nix-repl> :l <nixpkgs> | |
| Added 7228 variables. | |
| nix-repl> builtins.unsafeGetAttrPos "writeText" pkgs | |
| { column = 3; file = "/nix/store/1hlbyz4ni8axnncpqvdjmi2fvcf90y49-nixos-17.09pre102667.2839b10/nixos/pkgs/build-support/trivial-builders.nix"; line = 52; } | |
| nix-repl> |
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
| with import <nixpkgs> {}; | |
| let vendorgl = (linuxPackages.nvidia_x11.override { | |
| libsOnly = true; | |
| kernel = null; | |
| }).overrideAttrs (oldAttrs: rec { | |
| name = "nvidia-x11-367.27-${pkgs.linuxPackages.kernel.version}"; | |
| src = fetchurl { | |
| url = "http://download.nvidia.com/XFree86/Linux-x86_64/367.27/NVIDIA-Linux-x86_64-367.27.run"; | |
| sha256 = "0000000000000000000000000000000000000000000000000000"; |
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
| { | |
| allowUnfree = true; | |
| packageOverrides = pkgs: { | |
| foo = pkgs.foo.override { stdenv = pkgs.clangStdenv; }; | |
| }; | |
| } |
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 = { | |
| binaryCaches = [ "http://cache.earthtools.ca" ]; | |
| binaryCachePublicKeys = [ "c2d.localnet-1:YTVKcy9ZO3tqPNxRqeYEYxSpUH5C8ykZ9ImUKuugf4c=" ]; | |
| }; | |
| } |
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
| { pkgs ? import <nixpkgs> {}, pkgs_i686 ? pkgs.pkgsi686Linux }: | |
| rec { | |
| myGit = pkgs.git.overrideDerivation (attrs: { | |
| src = ./.; | |
| withManual = false; | |
| guiSupport = false; | |
| tcl=null; | |
| }); | |
| env = runCommand "env" { buildInputs = [ myGit ]; } ""; |
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 | |
| pkgs = import <nixpkgs> {}; | |
| callPackage = pkgs.newScope self; | |
| self = { | |
| foo = callPackage ./foo {}; | |
| }; | |
| in self |
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
| packageOverrides = pkgs: rec { | |
| linux_4_4 = pkgs.linux_4_4.override { | |
| extraConfig = '' | |
| SCHEDSTATS y | |
| LATENCYTOP y | |
| ''; | |
| }; | |
| }; |
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
| [clever@amd-nixos:/tmp/mnt]$ mkdir nix/store -pv | |
| mkdir: created directory 'nix' | |
| mkdir: created directory 'nix/store' | |
| [clever@amd-nixos:/tmp/mnt]$ for x in $(nix-store -qR $(realpath /run/current-system/sw/bin/bash)); do nix-store --dump $x | nix-store --restore /tmp/mnt/$x ; done | |
| [clever@amd-nixos:/tmp/mnt]$ ls nix/store/ | |
| 2bid4ynk163hmypgz7b4aanq2i0d41c3-ncurses-6.0 cg0gxn11n6sadfrw3p7l8rh053gn3f0z-bash-4.4-p5 wxdn46939hsihi92z1f4shkal5nd6p3n-readline-7.0p0 | |
| 3v5m2gn0kmxrg9xia0nqa491hmplvz2d-bash-4.4-p5 kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24 |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |