Add on top of default.nix: with import {};
or simply run as nix-build ''
(i. e. for nix-build complaining) or rather nix-build -E 'with import {}; callPackage ./default.nix {}'
(or even import)
#include <stdio.h> | |
#include <freetype2/ft2build.h> | |
#include FT_FREETYPE_H | |
int main() { | |
FT_Library ft; | |
FT_Error err = FT_Init_FreeType(&ft); | |
if (err != 0) { | |
printf("Failed to initialize FreeType\n"); |
/*bin/echo ' -*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;coding:utf-8 -*-┤ | |
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ | |
╞══════════════════════════════════════════════════════════════════════════════╡ | |
│ To the extent possible under law, Justine Tunney has waived │ | |
│ all copyright and related or neighboring rights to this file, │ | |
│ as it is written in the following disclaimers: │ | |
│ • http://unlicense.org/ │ | |
│ • http://creativecommons.org/publicdomain/zero/1.0/ │ | |
╚────────────────────────────────────────────────────────────────────'>/dev/null | |
if ! [ "${0%.*}.exe" -nt "$0" ]; then |
I'm writing this gist for my own records but it might help someone else too.
Support for Catalina has improved a lot since the update was first rolled out.
Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume
option.
namespace RFC where | |
parseDigit = oneOfChars [?0, ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9] | |
parseHex = Unipar.satisfy isHexDigit "wasn't a hex digit" | |
parseCRLF = (ch ?\r Unipar.>> ch ?\n) | |
type RawHeaders | |
= RawHeaders (Map Text Text) | |
type Request | |
= Request HostName Text RawHeaders |
WARNING: THIS GIST IS OUT OF DATE AND NO LONGER RELEVANT
- Native-comp was enabled by default in nixpgks
- Pgtk is not enabled by default, for that you can either override the derivation or use emacsPgtk from the nix-community emacs overlay if you don't want to build it yourself
{ lib, config, pkgs, ... }: | |
with lib; | |
{ | |
options.v4l2 = mkEnableOption "Enable the confguration to use the reflex as a webcam"; | |
config = mkIf config.v4l2 { | |
# 20.03: v4l2loopback 0.12.5 is required for kernel >= 5.5 | |
# https://github.com/umlaeute/v4l2loopback/issues/257 |
At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.
What killed Haskell, could kill Rust, too
What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.
Is Haskell dead?
# Instructions for fresh install | |
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
# reboot | |
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |