builtins.scopedImport
builtins.importNative:
- needs allow-unsafe-native-code-during-evaluation
- can be used to decrypt secrets
- documentation - https://github.com/NixOS/nix/commit/5cd022d6c099c583c0494bdacd06f4eb32661135
/* | |
SDL - Simple DirectMedia Layer | |
Copyright (C) 1997-2012 Sam Lantinga | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Library General Public | |
License as published by the Free Software Foundation; either | |
version 2 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, |
# Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135 | |
# Create the database with cmake with for example: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. | |
# or you could have set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in your CMakeLists.txt | |
# Usage within SublimeClang: | |
# "sublimeclang_options_script": "python ${home}/code/cmake_options_script.py ${project_path:build}/compile_commands.json", | |
import re | |
import os | |
import os.path |
builtins.scopedImport
builtins.importNative:
rec { | |
test1 = builtins.scopedImport { __nixPath = [ { path = test4; prefix="ssh-config-file"; } ] ++ __nixPath; }; | |
test2 = test1 <nixpkgs/pkgs/build-support/fetchgit/private.nix>; | |
pkgs = import <nixpkgs> {}; | |
test3 = pkgs.callPackage test2 {}; | |
test4 = pkgs.writeText "sshd_config" '' | |
# empty file, use programs.ssh.knownHosts in configuration.nix not StrictHostKeyChecking no | |
''; | |
test5 = test3 { | |
url = "git@github.com:cleverca22/not-os.git"; |
#! /usr/bin/env nix-shell | |
#! nix-shell --pure -i runghc -p rsync openssh "haskellPackages.ghcWithPackages (pkgs: [ pkgs.turtle ])" | |
{-# LANGUAGE OverloadedStrings #-} | |
import Turtle | |
import Prelude hiding (FilePath) | |
import qualified Data.Text as T | |
sshOpts :: [Text] | |
sshOpts = ["-o", "StrictHostKeyChecking=accept-new"] |
#!/bin/bash | |
set -euo pipefail | |
# uncomment to debug | |
# set -x | |
echo "1️⃣. Does catalina know to create the nix directory?" | |
if ! grep nix /etc/synthetic.conf > /dev/null 2>&1; then | |
echo "nix missing from /etc/synthetic.conf. Adding it (will request sudo)" | |
echo "nix" | sudo tee -a /etc/synthetic.conf > /dev/null |
import * as T from "@effect-ts/core/Effect" | |
import * as S from "@effect-ts/core/Effect/Experimental/Stream" | |
import * as L from "@effect-ts/core/Effect/Layer" | |
import * as M from "@effect-ts/core/Effect/Managed" | |
import * as Q from "@effect-ts/core/Effect/Queue" | |
import * as SC from "@effect-ts/core/Effect/Schedule" | |
import { literal, pipe } from "@effect-ts/core/Function" | |
import { tag } from "@effect-ts/core/Has" | |
import * as O from "@effect-ts/core/Option" | |
import type { _A } from "@effect-ts/core/Utils" |
let _ = global._ = require("lodash"); | |
let Benchmark = global.Benchmark = require("benchmark"); | |
let Promise = require("bluebird"); | |
let { Map } = require("immutable"); | |
let { produce } = require("immer"); | |
function getItems(count) { | |
let id = 1; |
with import ./. {}; | |
let | |
extraSources = []; | |
lib = pkgs.lib; | |
optionsListVisible = | |
lib.filter (opt: opt.visible && !opt.internal) | |
(lib.optionAttrSetToDocList options); |