aboutsummaryrefslogtreecommitdiff
path: root/src/content/pastebins/2018/07/25
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-11-18 08:21:58 -0300
committerEuAndreh <eu@euandre.org>2024-11-18 08:44:57 -0300
commit960e4410f76801356ebd42801c914b2910a302a7 (patch)
tree615d379416f72956d0c1666c63ce062859041fbe /src/content/pastebins/2018/07/25
parentRemove jekyll infrastructure setup (diff)
downloadeuandre.org-main.tar.gz
euandre.org-main.tar.xz
v0 migration to mkwbHEADmain
Diffstat (limited to 'src/content/pastebins/2018/07/25')
-rw-r--r--src/content/pastebins/2018/07/25/nix-exps.adoc58
-rw-r--r--src/content/pastebins/2018/07/25/nix-showdrv.adoc86
2 files changed, 144 insertions, 0 deletions
diff --git a/src/content/pastebins/2018/07/25/nix-exps.adoc b/src/content/pastebins/2018/07/25/nix-exps.adoc
new file mode 100644
index 0000000..23d75b6
--- /dev/null
+++ b/src/content/pastebins/2018/07/25/nix-exps.adoc
@@ -0,0 +1,58 @@
+---
+
+title: Nix exps
+
+date: 2018-07-25
+
+layout: post
+
+lang: en
+
+eu_categories: nix
+
+ref: nix-exps
+
+---
+
+```nix
+let
+ pkgsOriginal = import <nixpkgs> {};
+ pkgsSrc = pkgsOriginal.fetchzip {
+ url = "https://github.com/NixOS/nixpkgs/archive/18.03.zip";
+ sha256 = "0hk4y2vkgm1qadpsm4b0q1vxq889jhxzjx3ragybrlwwg54mzp4f";
+ };
+ pkgs = import (pkgsSrc) {};
+ stdenv = pkgs.stdenv;
+
+ # Taken from:
+ # http://www.cs.yale.edu/homes/lucas.paul/posts/2017-04-10-hakyll-on-nix.html
+ websiteBuilder = pkgs.stdenv.mkDerivation {
+ name = "website-builder";
+ src = ./hakyll;
+ phases = "unpackPhase buildPhase";
+ buildInputs = [
+ (pkgs.haskellPackages.ghcWithPackages (p: with p; [ hakyll ]))
+ ];
+ buildPhase = ''
+ mkdir -p $out/bin
+ ghc -O2 -dynamic --make Main.hs -o $out/bin/generate-site
+ '';
+ };
+in rec {
+ euandrehWebsite = stdenv.mkDerivation rec {
+ name = "euandreh-website";
+ src = ./site;
+ phases = "unpackPhase buildPhase";
+ # version = "0.1";
+ buildInputs = [ websiteBuilder ];
+ buildPhase = ''
+ export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive";
+ export LANG=en_US.UTF-8
+ generate-site build
+
+ mkdir $out
+ cp -r _site/* $out
+ '';
+ };
+}
+```
diff --git a/src/content/pastebins/2018/07/25/nix-showdrv.adoc b/src/content/pastebins/2018/07/25/nix-showdrv.adoc
new file mode 100644
index 0000000..813965d
--- /dev/null
+++ b/src/content/pastebins/2018/07/25/nix-showdrv.adoc
@@ -0,0 +1,86 @@
+---
+
+title: nix show-derivation sample output
+
+date: 2018-07-25
+
+layout: post
+
+lang: en
+
+eu_categories: nix
+
+ref: nix-show-derivation-sample-output
+
+---
+
+```nix
+$ nix show-derivation /nix/store/zzz9cl2ly0mb2njr7vwa5528fxmn29m8-combofont-0.2.drv
+{
+ "/nix/store/zzz9cl2ly0mb2njr7vwa5528fxmn29m8-combofont-0.2.drv": {
+ "outputs": {
+ "out": {
+ "path": "/nix/store/dc897j29s5pl5mcw064n5b07bydacfm5-combofont-0.2",
+ "hashAlgo": "r:sha1",
+ "hash": "06be9cab7176fe6d99dd773315d9ec5c62f6a71b"
+ }
+ },
+ "inputSrcs": [
+ "/nix/store/b6ill8amfg0gki49zapm4asrrw9zzgz9-builder.sh"
+ ],
+ "inputDrvs": {
+ "/nix/store/3s0crp8826gwvfap6kjjyh9a7wq92awk-stdenv.drv": [
+ "out"
+ ],
+ "/nix/store/fafsh2hx1xxqgm8gwkj3bw3czz6dcvvw-mirrors-list.drv": [
+ "out"
+ ],
+ "/nix/store/qqla9sd8p8qwgl2a1wpn75bwp2vw70mm-bash-4.4-p12.drv": [
+ "out"
+ ],
+ "/nix/store/v8fxvb0wlsa5pmrfawa3dg501mglw43c-curl-7.59.0.drv": [
+ "dev"
+ ]
+ },
+ "platform": "x86_64-linux",
+ "builder": "/nix/store/lw7xaqhakk0i1c631m3cvac3x4lc5gr5-bash-4.4-p12/bin/bash",
+ "args": [
+ "-e",
+ "/nix/store/b6ill8amfg0gki49zapm4asrrw9zzgz9-builder.sh"
+ ],
+ "env": {
+ "buildInputs": "",
+ "builder": "/nix/store/lw7xaqhakk0i1c631m3cvac3x4lc5gr5-bash-4.4-p12/bin/bash",
+ "configureFlags": "",
+ "curlOpts": "",
+ "depsBuildBuild": "",
+ "depsBuildBuildPropagated": "",
+ "depsBuildTarget": "",
+ "depsBuildTargetPropagated": "",
+ "depsHostBuild": "",
+ "depsHostBuildPropagated": "",
+ "depsTargetTarget": "",
+ "depsTargetTargetPropagated": "",
+ "downloadToTemp": "1",
+ "executable": "",
+ "impureEnvVars": "http_proxy https_proxy ftp_proxy all_proxy no_proxy NIX_CURL_FLAGS NIX_HASHED_MIRRORS NIX_CONNECT_TIMEOUT NIX_MIRRORS_apache NIX_MIRRORS_bioc NIX_MIRRORS_bitlbee NIX_MIRRORS_cpan NIX_MIRRORS_debian NIX_MIRRORS_fedora NIX_MIRRORS_gcc NIX_MIRRORS_gentoo NIX_MIRRORS_gnome NIX_MIRRORS_gnu NIX_MIRRORS_gnupg NIX_MIRRORS_hackage NIX_MIRRORS_hashedMirrors NIX_MIRRORS_imagemagick NIX_MIRRORS_kde NIX_MIRRORS_kernel NIX_MIRRORS_maven NIX_MIRRORS_metalab NIX_MIRRORS_mozilla NIX_MIRRORS_mysql NIX_MIRRORS_oldsuse NIX_MIRRORS_openbsd NIX_MIRRORS_opensuse NIX_MIRRORS_postgresql NIX_MIRRORS_pypi NIX_MIRRORS_roy NIX_MIRRORS_sagemath NIX_MIRRORS_samba NIX_MIRRORS_savannah NIX_MIRRORS_sourceforge NIX_MIRRORS_sourceforgejp NIX_MIRRORS_steamrt NIX_MIRRORS_ubuntu NIX_MIRRORS_xfce NIX_MIRRORS_xorg",
+ "mirrorsFile": "/nix/store/36pk3fz566c2zj6bj8qy7gxl1z14xc4f-mirrors-list",
+ "name": "combofont-0.2",
+ "nativeBuildInputs": "/nix/store/hgv54iw72sgpqmzgv30s6gsfc4rd4wzp-curl-7.59.0-dev",
+ "out": "/nix/store/dc897j29s5pl5mcw064n5b07bydacfm5-combofont-0.2",
+ "outputHash": "3fkzcqjwxkciacvpvncnvzknf6mrrgh6",
+ "outputHashAlgo": "sha1",
+ "outputHashMode": "recursive",
+ "postFetch": "mkdir \"$out\";tar -xf $downloadedFile \\\n '--strip-components=0' \\\n -C \"$out\" --anchored --exclude=tlpkg --keep-old-files\n",
+ "preferHashedMirrors": "1",
+ "preferLocalBuild": "1",
+ "propagatedBuildInputs": "",
+ "propagatedNativeBuildInputs": "",
+ "showURLs": "",
+ "stdenv": "/nix/store/i3kgk0nibrbpgmzdwdfi2ym50i8m3lww-stdenv",
+ "system": "x86_64-linux",
+ "urls": "http://146.185.144.154/texlive-2017/combofont.tar.xz http://gateway.ipfs.io/ipfs/QmRLK45EC828vGXv5YDaBsJBj2LjMjjA2ReLVrXsasRzy7/texlive-2017/combofont.tar.xz"
+ }
+ }
+}
+```