Skip to content

Instantly share code, notes, and snippets.

Avatar
❄️
1970 /nix/store

Daiderd Jordan LnL7

❄️
1970 /nix/store
View GitHub Profile
View example.nix
let
builder = "${builtins.storePath <bash>}/bin/bash";
in
{
# nix-build basic.nix -A foo -I bash=$(nix-build '<nixpkgs>' -A bash --no-out-link)
foo = derivation {
name = "foo-0.0.0";
inherit builder;
args = ["-c" "echo 42 > $out"];
@LnL7
LnL7 / u.sh
Created November 20, 2020 20:05
View u.sh
:u() {
local exports
exports=$(direnv apply_dump <(nix-shell -E "with import <nixpkgs> {}; mkShell { buildInputs = [ $* ]; }" --run 'direnv dump'))
eval "$exports"
name+="''${name:+ }$*"
typeset -U PATH
}
View darwin-bootstrap-tdb.patch
diff --git a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
index 761ff3ea925..a8f667dcbe7 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/ICU/default.nix
@@ -20,4 +20,8 @@ appleDerivation {
mv $out/usr/local/include $out/include
rm -rf $out/usr
'';
+
+ failureHook = ''
View log-format.patch
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index aa694577d..504ae6ebd 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -207,6 +207,16 @@ std::string listLogFormats()
return res;
}
+LogFormatSetting::LogFormatSetting(Config * options,
+ LogFormat def,
View shell.nix
with import <nixpkgs> {};
with darwin.apple_sdk.frameworks;
stdenv.mkDerivation {
name = "elixir-environment";
strictDeps = true;
nativeBuildInputs = [ beam.packages.erlangR23.elixir nodejs coreutils-prefixed pkgconfig fwup squashfsTools ];
buildInputs = [ CoreFoundation CoreServices ];
NIX_CFLAGS_COMPILE = "-Wimplicit-function-declaration";
}
@LnL7
LnL7 / config.json
Created June 17, 2020 20:54
OfBorg Configuration
View config.json
{
"runner": {
"identity": "test-builder"
},
"checkout": {
"root": "/tmp/ofborg"
},
"nix": {
"system": "x86_64-linux",
"remote": "daemon",
View hydra-job-revision
hydra-job-revision() {
local jobseteval job=$1
shift 1
case "$job" in
*'/'*) ;;
*) job="nixpkgs/trunk/$job" ;;
esac
case "$job" in
'http://'*|'https://'*) ;;
*) job="https://hydra.nixos.org/job/$job" ;;
View Dockerfile
FROM lnl7/nix:2.3.6
RUN nix-store --repair-path $(nix-store -qR $(which nix))
COPY entrypoint.sh /
ENTRYPOINT /entrypoint.sh
View configuration.nix
{ config, lib, ... }:
{
imports = [ ./example-module.nix ];
example.enable = true;
}
@LnL7
LnL7 / update
Last active July 13, 2020 12:33
Git deploy hook
View update
#!/usr/bin/env bash
set -e
BRANCH=master
TARGET=/etc/nixos
ref="$1"
oldrev="$2"
newrev="$3"