Skip to content

Instantly share code, notes, and snippets.

View LnL7's full-sized avatar
❄️
1970 /nix/store

Daiderd Jordan LnL7

❄️
1970 /nix/store
View GitHub Profile
self: super:
{
vimPlugins = super.vimPlugins // {
pytest-vim-compiler = super.vimUtils.buildVimPluginFrom2Nix {
pname = "pytest-vim-compiler";
version = "2015-05-28";
src = super.fetchFromGitHub {
owner = "5long";
repo = "pytest-vim-compiler";
rev = "f7c4cd0302c7baedffb45857e63eb4182d8ac45b";
@LnL7
LnL7 / nginx.conf
Created February 7, 2020 10:29
nginx http cache store
$ nginx -p $PWD -c nginx.conf -g 'daemon off;' &
$ hello=$(nix-build '<nixpkgs>' -A hello --no-out-link)
$ nix copy $hello --to http://127.0.0.1:8000
[14 copied (42.4 MiB)]
$ nix path-info --sigs -Sh $hello --store http://127.0.0.1:8000
/nix/store/7hv98clggrv5as3b0mr1slr38wwx92cx-hello-2.10 42.4M cache.nixos.org-1:+NSDaEVtUvyS0+2ILrS+wkZ21y4vXi47H4jfXWj6WaFal6eRREgLi7VTAkf1xS+135ThAusW9uxIfGJ9oHx8CA==
$ nix copy --to ssh-ng://cache-host
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index 82365d986b8..f2ff6d6508d 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -29,10 +29,10 @@ let
sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63";
};
# HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM
- normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl {
+ normal-src = fetchurl {
@LnL7
LnL7 / nix.conf
Created December 2, 2019 19:45
sandboxing on darwin
sandbox = true
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env
@LnL7
LnL7 / default.nix
Created November 28, 2019 17:11
redis server setup-hook
{ makeSetupHook, redis }:
makeSetupHook { deps = [ redis ]; } ./setup-hook.sh
{ pkgs ? import <nixpkgs> {} }:
with pkgs.lib;
let
mapStdenv = stdenv: x:
(x.override { inherit stdenv; }).overrideAttrs (drv:
optionalAttrs (drv ? "buildInputs") {
buildInputs = map (mapStdenv stdenv) drv.buildInputs;
} //
@LnL7
LnL7 / IncrementNix.hs
Created October 4, 2019 21:09
Example hnix transformation
#!/usr/bin/env nix-shell
#!nix-shell -i runhaskell -p "haskellPackages.ghcWithPackages (p: with p; [ hnix ])"
module Main where
import Data.Text.IO as T
import System.Exit
import Nix
import Nix.Atoms
import Nix.Utils (transport)
@LnL7
LnL7 / configuration.nix
Created September 25, 2019 06:02
plex override
{ pkgs, ... }:
{
nixpkgs.overlays = [
(self: super:
{
plex = super.plex.override { inherit (self) plexRaw; };
plexRaw = super.plexRaw.overrideAttrs (drv: rec {
name = "plex-${version}";
SYNTHETIC.CONF(5) BSD File Formats Manual SYNTHETIC.CONF(5)
NNAAMMEE
ssyynntthheettiicc..ccoonnff
SSYYNNOOPPSSIISS
ssyynntthheettiicc..ccoonnff -- synthetic symbolic link and directory manifest
DDEESSCCRRIIPPTTIIOONN