Skip to content

Instantly share code, notes, and snippets.

View dmalikov's full-sized avatar
🥞
!

Dmitry Malikov dmalikov

🥞
!
View GitHub Profile
@dmalikov
dmalikov / wut
Created September 6, 2014 19:23
you prolly should just add '.' to the end of the path to make nix happy, obv
cabal.mkDerivation (self: {
pname = "cabal2nix";
version = "0.1";
src = /home/yep/git/cabal2nix/;
isLibrary = true;
$ nix-shell -p myHaskellPackages.cabal2nix
error: syntax error, unexpected ';', at /home/yep/.nixpkgs/cabal2nix/default.nix:14:32
(use `--show-trace' to show detailed location information)
@dmalikov
dmalikov / gist:0a5d7919378d6bcd1aae
Last active August 29, 2015 14:06
Meanwhile on a #bash interview (or even #zsh)
$ [[ -n "$(echo "string with word word" | grep -o word))" ]] && echo contains
contains
$ [[ -n "$(echo "string without it" | grep -o word))" ]] && echo contains
contains
@dmalikov
dmalikov / wut
Created September 8, 2014 18:52
nix-shell vs hdevtools
>> nix-shell -p myHaskellPackages.dotfiles
error: file `/home/yep/dmalikov/dotfiles/biegunka/.hdevtools.sock' has an unsupported type
(use `--show-trace' to show detailed location information)
@dmalikov
dmalikov / wow
Created September 28, 2014 19:43
Trying to build some package with a latest nixpkgs and updated channels
> nix-build -A haskellPackages.liblastfm --dry-run
these derivations will be built:
/nix/store/030bhqpnza6xjr7x1ljyxijz96y3aqcx-byteable-0.1.1.tar.gz.drv
/nix/store/05dx9vjkqdg61886gjj0d4qd4gpvp7i2-haskell-cryptohash-ghc7.8.3-0.11.6-shared.drv
/nix/store/0dla3dkdijwwdazcmr3ngbr0w902sb0z-crypto-numbers-0.2.3.tar.gz.drv
/nix/store/0dyjz5fmwqy2cyvdg0nwnsfv4ywaxms5-bootstrap-glibc.drv
/nix/store/0g5wn1j1rnvv8mcswivw370y6c1j88ng-haskell-punycode-ghc7.8.3-2.0-shared.drv
/nix/store/0ikg161x1s06gr3n4k31qxbkkx5q5c6z-haskell-setenv-ghc7.8.3-0.1.1.1-shared.drv
/nix/store/0j2wgcfg3r6y2hhsywdzcjb5r67vwq4z-smallcheck-1.1.1.tar.gz.drv
/nix/store/0rixhgcs1nkdmfbpi7sdszb9gm2b1bx7-xz-5.0.5.tar.bz2.drv
@dmalikov
dmalikov / gist:38794149b7670f44a252
Created October 18, 2014 20:29
nix-shell failure because of cabal warning
>> nix-shell -p myHaskellPackages.dotfiles
these derivations will be built:
/nix/store/7rq3fqv0ia687v70bhxb609fnid340wl-dotfiles-9999.drv
building path(s) `/nix/store/c0k5926bn1gsvwfln6ahncx0awihgb13-dotfiles-9999'
building /nix/store/c0k5926bn1gsvwfln6ahncx0awihgb13-dotfiles-9999
unpacking sources
unpacking source archive /nix/store/g761dl7mirwfcawgw4hpknmz2gcd6hcd-biegunka
source root is biegunka
patching sources
configuring
@dmalikov
dmalikov / gist:55d83f5f3062a604cae3
Last active August 29, 2015 14:07
[wat] `nixos-rebuild switch` switches tig version from 2.0.3 to 1.2.1 like clockwork
# I'm just calling same `sudo nixos-rebuild switch` command many times from the same directory
yep@nixos : ~ >> sudo nixos-rebuild switch
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/6r8b8k9b59fi3nckb8w1dzxxydp4s87j-unit.drv
/nix/store/cf68gijlb05fjcpzsnjl7yhq92b9mmv4-system-units.drv
/nix/store/g83gindm03c4wzbwj99nvcviszyp1527-nixos-14.10.git.7d0a7ed.drv
/nix/store/ha3vd3igichjwlj263nz0ap2vk0hn69s-sshd.pam.drv
@dmalikov
dmalikov / ghc-pkg-check
Created November 3, 2014 10:32
[doing-something-wrong] nixos produces tons of dead haskell packages
There are problems in package yaml-0.8.9.3:
dependency "base-4.7.0.1-1acdd7bb255299e13f52849f98f9b3f2" doesn't exist
dependency "bytestring-0.10.4.0-3b693323d00f6a0050c2715338d2dd69" doesn't exist
dependency "containers-0.5.5.1-b89e8be9f833fcd6797b611973bba2ab" doesn't exist
There are problems in package void-0.6.1:
dependency "base-4.7.0.1-1acdd7bb255299e13f52849f98f9b3f2" doesn't exist
There are problems in package vector-0.10.12.1:
dependency "base-4.7.0.1-1acdd7bb255299e13f52849f98f9b3f2" doesn't exist
dependency "deepseq-1.3.0.2-d8a716b4bcd889c2b54a65c492a75647" doesn't exist
There are problems in package unordered-containers-0.2.5.1:
@dmalikov
dmalikov / Main.hs
Last active August 29, 2015 14:10
nix-shell behaves assimetrically pointing at local default.nix and using global ~/.nixpkgs/config.nix tree
main = print 1
@-moz-document domain("manage.windowsazure.com") {
#headerbar-wrapper {
width: 100%;
margin-left: 0;
left: 0;
}
#fxshell-navpane {
left: 0;
margin-left: 0;
}