Skip to content

Instantly share code, notes, and snippets.

{ stdenv
, haskellPackages
}:
let
ghc = haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
yi
yi-frontend-pango
yi-keymap-emacs
yi-misc-modes
class Either(object):
pass
class Left(Either):
def __init__(self, v): self.v = v
def is_left(self): return True
def is_right(self): return False
def value(self): return self.v
class Right(Either):
{ pkgs, ... }:
{
imports = [ /etc/nixos/hardware-configuration.nix ];
boot = {
kernelParams = [ "quiet" "splash" "acpi_osi=Linux" ];
loader = {
systemd-boot.enable = true;
{ pkgs, ... }:
{
imports = [ /etc/nixos/hardware-configuration.nix ];
boot = {
kernelParams = [ "quiet" "splash" "acpi_osi=Linux" ];
loader = {
systemd-boot.enable = true;
{ pkgs, ... }:
pkgs.lib.filter (x: false)
{ pkgs, ... }:
_:
[]
{ pkgs, ... }:
{
imports = [ /etc/nixos/hardware-configuration.nix ];
boot = {
kernelParams = [ "quiet" "splash" "acpi_osi=Linux" ];
loader = {
systemd-boot.enable = true;
ncurses = (pkgs.ncurses.overrideAttrs (oldAttrs: {
configureFlags = oldAttrs.configureFlags ++
pkgs.lib.optionals pkgs.targetPlatform.isMinGW [
"--enable-sp-funcs"
"--enable-term-driver"
];
preFixup = pkgs.lib.optionalString (!pkgs.hostPlatform.isCygwin && !enableStatic) ''
rm "$out"/lib/*.a
'';
let (Just requestVerification) = loginPage ^. responseBody
. to parseTags
. to (find (~== "<input name='__RequestVerificationToken'>"))
& mapped
%~ fromAttrib "__RequestVerificationToken"
use std::cmp;
use std::mem;
/// Position within a line
pub type Pos = usize;
/// Text zipper
pub struct Zip<'a> {
/// Lines before the current line
prev: Vec<&'a str>,