Skip to content

Instantly share code, notes, and snippets.

View Glut.hs
import System.Exit (exitWith, ExitCode(ExitSuccess))
import Graphics.UI.GLUT
main = do
(progName, _args) <- getArgsAndInitialize
initialDisplayMode $= [ SingleBuffered, RGBMode ]
initialWindowSize $= Size 500 500
_ <- createWindow progName
exitWith ExitSuccess
@cleverca22
cleverca22 / default.nix
Created Aug 28, 2019 — forked from idontgetoutmuch/default.nix
pkg config generation
View default.nix
{ stdenv, fetchurl, gfortran }:
stdenv.mkDerivation rec {
name = "blas-${version}";
version = "3.8.0";
src = fetchurl {
url = "http://www.netlib.org/blas/${name}.tgz";
sha256 = "1s24iry5197pskml4iygasw196bdhplj0jmbsb9jhabcjqj2mpsm";
};
View default.nix
self: super:
let
pythonOverlay = pself: psuper:
{
sundials_3_lapack = pself.callPackage ./pkgs/sundials { };
myScikits-odes = pself.callPackage ./pkgs/scikits-odes { };
};
in {
pythonPackages = super.pythonPackages.override { overrides = pythonOverlay; };
}
View default.nix
# in rails project
with (import <nixpkgs> {});
let
rubyenv = bundlerEnv {
name = "cart-env";
# Setup for ruby gems using bundix generated gemset.nix
inherit ruby_2_6;
gemfile = ./Gemfile;
View custom-alarm.nix
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "gazoscalvertos";
repo = "Hass-Custom-Alarm";
rev = "v1.3.1";
sha256 = "1xlwsyg45kmvx3gvkv7k5imbhkxan0s573lalkcqcflf078w7555";
}
View default.nix
with import <nixpkgs> {};
clangStdenv.mkDerivation {
name = "emojicode-0.6";
src = fetchFromGitHub {
owner = "emojicode";
repo = "emojicode";
sha256 = "0v5r481xhjc3kdk9a49yi9lqnd6gxq5iws4d65dcx43mw3wz38sj";
rev = "5d655df6b7f7ffa13c4addfc140ef83d695381ca";
};
View default.nix
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "emojicode-0.6";
src = fetchFromGitHub {
owner = "emojicode";
repo = "emojicode";
sha256 = "0v5r481xhjc3kdk9a49yi9lqnd6gxq5iws4d65dcx43mw3wz38sj";
rev = "5d655df6b7f7ffa13c4addfc140ef83d695381ca";
};
View default.nix
{ stdenv, fetchurl, unzip, interface, writeText, jre, zopfli }:
stdenv.mkDerivation {
name = "static-assets";
phases = [ "unpackPhase" "installPhase" ];
buildInputs = [ jre unzip ];
installPhase = ''
mkdir -p $out/share
cp ${./Allsight.svg} $out/Allsight.svg
cp ${./swoosh.svg} $out/swoosh.svg
View default.nix
{ stdenv, fetchurl, unzip, interface, writeText, jre }:
let allSight = writeText "Allsight.svg" (builtins.readFile ./Allsight.svg);
swoosh = writeText "swoosh.svg" (builtins.readFile ./swoosh.svg);
in stdenv.mkDerivation {
name = "static-assets";
phases = [ "unpackPhase" "installPhase" ];
buildInputs = [ jre unzip ];
installPhase = ''
mkdir -p $out
cp ${allSight} $out/Allsight.svg
View gopanda.nix
{ pkgs ? import <nixpkgs> {}
, cairo ? pkgs.cairo
, fetchurl ? pkgs.fetchurl
, glib ? pkgs.glib
, patchelf ? pkgs.patchelf
, stdenv ? pkgs.stdenv
, xorg ? pkgs.xorg
, nss
, nspr
, gnome3
You can’t perform that action at this time.