Skip to content

Instantly share code, notes, and snippets.

@yorickvP
yorickvP / default.nix
Created May 24, 2020 14:43
picoscope.nix
let pkgs = import <nixpkgs> {};
in
rec {
libpicoipp = pkgs.callPackage ./libpicoipp.nix {};
picoscope = pkgs.callPackage ./picoscope.nix {
inherit libpicoipp;
mono = pkgs.mono6;
gtk-sharp-2_0 = pkgs.gtk-sharp-2_0.override { mono = pkgs.mono6; };
};
}
{ pkgs ? import <nixpkgs> { }, stdenv ? pkgs.stdenv, love_0_7 ? pkgs.love_0_7 }:
let
name = "nottetris2";
src = pkgs.fetchzip {
url = "http://stabyourself.net/dl.php?file=${name}/${name}-linux.zip";
sha256 = "1zwwp4h1njwl3jnwkszcsqx868v16312pbfy5rp9h48ym79spd36";
stripRoot = false;
};
in pkgs.writeShellScriptBin name ''
exec ${love_0_7}/bin/love "${src}/Not Tetris 2.love"
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index 85305e84266..91301d6a199 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -28,7 +28,7 @@ let
inherit sha256;
};
- outputs = [ "out" "lib" "doc" "man" ];
+ outputs = [ "out" "lib" "doc" "man" "dev" ];
@yorickvP
yorickvP / omnidb-pkg.sh
Last active April 7, 2020 13:01
omnidb-python.nix
poetry init
cat requirements.txt | perl -pe 's/([<=>]+)/:$1/' | xargs -t -n 1 -I {} poetry add '{}'
let
pkgs = import <nixpkgs> { };
inherit (pkgs) lib nixos;
shim = {
boot.loader.systemd-boot.enable = true;
fileSystems."/" = {
device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
fsType = "btrfs";
};
};
diff --git a/compiler/old-ghc-nix/default.nix b/compiler/old-ghc-nix/default.nix
index 7d8a396..228c329 100644
--- a/compiler/old-ghc-nix/default.nix
+++ b/compiler/old-ghc-nix/default.nix
@@ -3,8 +3,8 @@ let
fetch = jsonFile:
with builtins;
let spec = fromJSON (readFile jsonFile);
- in pkgs.fetchgit {
+ in builtins.fetchGit {
#define HAVE_BOEHMGC 1
#include "miniz.h"
#include <nix/eval.hh>
#include <nix/eval-inline.hh>
#include <iostream>
using namespace nix;
class ZipFileValue : public ExternalValueBase
{
mz_zip_archive zipfile;
#!/usr/bin/env bash
# usage: ./nix-copy-quick.sh /nix/store/asdf.drv build-server.com
TMPDIR=$(mktemp -d)
echo $TMPDIR
function finish {
rm -rf $TMPDIR
}
trap finish EXIT
set -x
nix copy --to file://$TMPDIR $1
$ nix build -f https://github.com/input-output-hk/nix-tools/archive/master.tar.gz
trace: gitSource.nix: /nix/store/6iymd0909n1lggkany7y13cg2hsxaz2n-master.tar.gz does not seem to be a git repository,
assuming it is a clean checkout.
trace: Using index-state: 2020-01-10T00:00:00Z
builder for '/nix/store/glvsk7b5zkalmsd8lmka5jc3xp453zhc-hnix-617d086.drv' failed with exit code 1; last 10 log lines:
* [new tag] 1.5.1 -> 1.5.1
* [new tag] 1.5.2 -> 1.5.2
* [new tag] 1.5.3 -> 1.5.3
* [new tag] 1.6 -> 1.6
* [new tag] 1.6.1 -> 1.6.1