Skip to content

Instantly share code, notes, and snippets.

{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, ad, aeson, base, bytestring, containers
, deepseq, filepath, process, random, raw-strings-qq, split, stdenv
, tasty, tasty-expected-failure, tasty-golden, tasty-hunit
, temporary, python3, python3Packages.matplotlib
{pkgs, lib, ... }:
let
pinRollback = pkgs.writeShellScriptBin "ar-pin-rollback"
''
CURVERSION=$(nix-env --list-generations -p /nix/var/nix/profiles/system | grep -Po '([0-9]+)(?=\s+[0-9 -]+ [0-9 :]+\s*\(current\))')
echo Setting /nix/var/nix/rollback-version to $CURVERSION
echo $CURVERSION > /nix/var/nix/rollback-version