Skip to content

Instantly share code, notes, and snippets.

{ pkgs, ... }:
let
justdoit = pkgs.writeScriptBin "justdoit" ''
#!${stdenv.shell}
set -ex
sfdisk /dev/sda <<EOF
label: dos
device: /dev/sda
unit: sectors
{ pkgs ? import <nixpkgs> {} , withEditor ? false }:
let
version = "8.0-dev";
in
pkgs.stdenv.mkDerivation rec {
name = "openclonk-${version}";
gitRef = pkgs.lib.commitIdFromGitRepo ./.git;
let
# TODO: fix EABI/OABI discrepancy
kernelConfig = "imx_v6_v7_defconfig";
pkgs = import ./. {
crossSystem = {
config = "arm-linux-gnueabihf";
bigEndian = false;
arch = "arm";
float = "hard";
withTLS = true;
nix-repl> php56Packages.memcached.overrideAttrs
«lambda»
let
pkgs = import <nixpkgs> {};
isoWritableModule = { config, pkgs, lib, ... }:
{
config = {
fileSystems."/0-rw" = {
fsType = "ext4";
neededForBoot = true;
device = "/dev/disk/by-label/NIXOS_RW";
};
@lheckemann
lheckemann / 0001-x11-accept-commands-on-stdin-as-well.patch
Created June 28, 2017 20:43
Patch that allows controlling mupdf-x11 via stdin
From 913774e20010c6dd9c9208d4c28707159066f1ec Mon Sep 17 00:00:00 2001
From: Linus Heckemann <git@sphalerite.org>
Date: Wed, 28 Jun 2017 21:12:39 +0100
Subject: [PATCH] x11: accept commands on stdin as well
---
platform/x11/x11_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c
with import <nixpkgs> { system = "i686-linux"; };
writeScript "do-patchelf" ''
#!${stdenv.shell}
patchelf --interpreter "$(cat ${gcc}/nix-support/dynamic-linker)" --set-rpath ${lib.makeLibraryPath [ zlib ]} \$1
''
let
pkgs = import <nixpkgs> {};
inherit (pkgs) lib;
evalModules = with lib; { modules
, prefix ? []
, # This should only be used for special arguments that need to be evaluated
# when resolving module structure (like in imports). For everything else,
# there's _module.args. If specialArgs.modulesPath is defined it will be
# used as the base path for disabledModules.
specialArgs ? {}
NAME USED WRITTEN LUSED RATIO DEDUP COMPRESS
rpool/nixstore 30.1G 30.1G 48.5G 1.77x on on
rpool/nixstore-compressiononly 29.9G 29.9G 48.5G 1.77x off on
#! /nix/store/hqi64wjn83nw4mnf9a5z9r4vmpl72j3r-bash-4.4-p12/bin/bash
NIX_DISK_IMAGE=$(readlink -f ${NIX_DISK_IMAGE:-./sudoku.qcow2})
if ! test -e "$NIX_DISK_IMAGE"; then
/nix/store/xrfv11vy8by8p6ixksv49ay17h8dj2sx-qemu-x86-only-for-vm-tests-2.9.1/bin/qemu-img create -f qcow2 "$NIX_DISK_IMAGE" \
512M || exit 1
fi
# Create a directory for storing temporary data of the running VM.