nixos

What does the <nixpkgs> string / value mean in Nix?

五迷三道 提交于 2019-12-10 15:00:37
问题 For example in the following (which I assume is a nix expression): (import <nixpkgs> {}).haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [ lens aeson turtle ]) What does <nixpkgs> reference? I also see it used in other contexts for example: nix-shell '<nixpkgs>' -A linuxPackages.kernel 回答1: <nixpkgs> is a Nix expression that is evaluated by looking at the Nix search path in the NIX_PATH environment variable and/or -I option. It is described in more detail in the Nix manual. Note that the

Cannot build a hello world program with Stack because of flag bytestring--lt-0_10_4

一曲冷凌霜 提交于 2019-12-10 13:34:10
问题 With a bare "hello world" project generated by stack new myproject simple whenever I run stack setup , stack init or stack build I have the following error all the time: Downloading lts-10.0 build plan Downloaded lts-10.0 build plan. AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-0_10_4\"" I saw some guys talk about the issue, and argue about whether it is accepted or not to have two sequential - in a flag name like

Why are some setxkbmap options ignored?

ε祈祈猫儿з 提交于 2019-12-10 10:57:18
问题 in share/X11/xkb/rules/evdev/lst, I find this set of options for ctrl ctrl Ctrl key position ctrl:nocaps Caps Lock as Ctrl ctrl:lctrl_meta Left Ctrl as Meta ctrl:swapcaps Swap Ctrl and Caps Lock ctrl:ac_ctrl At left of 'A' ctrl:aa_ctrl At bottom left ctrl:rctrl_ralt Right Ctrl as Right Alt ctrl:menu_rctrl Menu as Right Ctrl ctrl:ctrl_ralt Right Alt as Right Ctrl ctrl:swap_lalt_lctl Swap Left Alt key with Left Ctrl key ctrl:swap_lwin_lctl Swap Left Win key with Left Ctrl key ctrl:swap_lalt

stack build error: attribute ‘ghc822’ missing, at (string):1:53

邮差的信 提交于 2019-12-09 16:32:36
问题 I am attempting to build my haskell project on NixOS. Running $ stack build gives the following error. $ stack build error: attribute ‘ghc822’ missing, at (string):1:53 (use ‘--show-trace’ to show detailed location information) What does this error mean and how could I proceed? When I run $ stack build --show-trace as suggested, I get the following output, which I do not understand either. $ stack build --show-trace Invalid option `--show-trace' Usage: stack build [TARGET] [--dry-run] [-

can't find curl-config on NixOS

一曲冷凌霜 提交于 2019-12-07 11:56:28
问题 I'm trying to install vim-now-haskell on NixOS 17.09. The installation fails with the exception *** Installer requires 'curl-config'. Please install and try again. *** Aborting... Unfortunately Search NixOS packages doesn't list any package for curl-config . It also isn't in installed curl-7.56.1 . I can hardly believe NixOS doesn't provide curl-config . Therefore I'm looking here for help to find it. 回答1: It's in the curl.dev output. $ ls $(nix-build --no-out-link '<nixpkgs>' -A curl.dev)

Why are some setxkbmap options ignored?

丶灬走出姿态 提交于 2019-12-06 13:28:58
in share/X11/xkb/rules/evdev/lst, I find this set of options for ctrl ctrl Ctrl key position ctrl:nocaps Caps Lock as Ctrl ctrl:lctrl_meta Left Ctrl as Meta ctrl:swapcaps Swap Ctrl and Caps Lock ctrl:ac_ctrl At left of 'A' ctrl:aa_ctrl At bottom left ctrl:rctrl_ralt Right Ctrl as Right Alt ctrl:menu_rctrl Menu as Right Ctrl ctrl:ctrl_ralt Right Alt as Right Ctrl ctrl:swap_lalt_lctl Swap Left Alt key with Left Ctrl key ctrl:swap_lwin_lctl Swap Left Win key with Left Ctrl key ctrl:swap_lalt_lctl_lwin Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt Some of them work - if I run setxkbmap

install virtualbox modules from nixos-unstable in configuration.nix

自古美人都是妖i 提交于 2019-12-06 09:53:31
问题 It is possible to install packages from nixos-unstable in /etc/nixos/configuration.nix using the configuration from this answer. Here is an example of installing the htop packages from nixos-unstable: { config, pkgs, ... }: let unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz; in { ... nixpkgs.config = { packageOverrides = pkgs: { unstable = import unstableTarball { config = config.nixpkgs.config; }; }; }; environment.systemPackages = with

Import unstable and inherit config

与世无争的帅哥 提交于 2019-12-06 06:10:22
I have a package-upgrades.nix that I use to upgrade packages from unstable or a fork. {...}: { nixpkgs.config = { packageOverrides = let pkgsUnstable = import ( fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz ) { }; pkgsMaster = import ( fetchTarball https://github.com/NixOS/nixpkgs/archive/master.tar.gz ) { }; pkgsLocal = import ( fetchTarball https://github.com/moaxcp/nixpkgs/archive/local.tar.gz ) { }; in pkgs: rec { dropbox = pkgsUnstable.dropbox; jbake = pkgsUnstable.jbake; }; }; } This works well for things like windows manager. notion = pkgsUnstable

How can I install a Haskell library to be accessible via GHCi with Nixos?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 00:08:09
问题 I've managed to install ghc with nix-env -i ghc . I'd like to install a Haskell library now, how should this be done? For example the turtle (https://hackage.haskell.org/package/turtle) library. I've run nix-env -f "<nixpkgs>" -iA haskellPackages.turtle , however running ghci and import Turtle fails: Prelude> import Turtle <no location info>: error: Could not find module ‘Turtle’ It is not a module in the current program, or in any known package. Output of ghc-pkg list : /nix/store

can't find curl-config on NixOS

爱⌒轻易说出口 提交于 2019-12-05 17:49:57
I'm trying to install vim-now-haskell on NixOS 17.09. The installation fails with the exception *** Installer requires 'curl-config'. Please install and try again. *** Aborting... Unfortunately Search NixOS packages doesn't list any package for curl-config . It also isn't in installed curl-7.56.1 . I can hardly believe NixOS doesn't provide curl-config . Therefore I'm looking here for help to find it. It's in the curl.dev output. $ ls $(nix-build --no-out-link '<nixpkgs>' -A curl.dev)/bin curl-config The reason for this is to keep the closure size of anything the uses curl small. Normally