This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| # First, let's get a haskellPackages set to play around with | |
| haskellPackages = (import <nixpkgs> {}).haskellPackages; | |
| # Change the default mtl | |
| haskellPackagesMtl = haskellPackages.override { | |
| overrides = self: super: { | |
| mtl = super.mtl_2_1_3_1; | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { mkDerivation, base, stdenv, time }: | |
| mkDerivation { | |
| pname = "acme-year"; | |
| version = "2014"; | |
| sha256 = "0zml370s8zv9y60hggv0hlwb3rhmixhdp37cz496dbpffdkw70my"; | |
| libraryHaskellDepends = [ base ]; | |
| testHaskellDepends = [ base time ]; | |
| homepage = "http://github.com/joeyadams/hs-acme-year"; | |
| description = "Get the current year"; | |
| license = stdenv.lib.licenses.publicDomain; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cabal file warning in /data/code/cabal/cabal-install/cabal-install.cabal: Ignoring unknown section type: custom-setup | |
| Cabal file warning in /data/code/cabal/cabal-install/cabal-install.cabal: Ignoring unknown section type: custom-setup | |
| No packages found in snapshot which provide a "ghc" executable, which is a build-tool dependency of "HTTP" | |
| Missing build-tools may be caused by dependencies of the build-tool being overridden by extra-deps. | |
| This should be fixed soon - see this issue https://github.com/commercialhaskell/stack/issues/595 | |
| While constructing the BuildPlan the following exceptions were encountered: | |
| -- Failure when adding dependencies: | |
| network-uri: needed (==2.6.*), couldn't resolve its dependencies |
In the following example, sddm will be used as a display manager. The process is however similar for other display managers in nixpkgs and a summary that applies to all nixpkgs display managers is given at the end.
-
Systemd unit "display-manager.service" starts
services.x11.displayManager.job.execCmd(the display manager)Code reference:
<nixpkgs>/nixos/modules/services/x11/xserver.nix -
services.x11.displayManager.job.execCmdis set to the path of thesddmbinary from thesddmpackage in the nix store. So SDDM will start and read its configuration from/etc/sddm.conf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with (import <nixpkgs> {}); # get nixpkgs | |
| let | |
| intero = null; # derivation to build intero goes here | |
| interoFor = interoEnv: stdenv.mkDerivation { | |
| buildInputs = [ makeWrapper ]; | |
| buildCommand = '' | |
| mkdir -p $out/bin | |
| for binary in ${intero}/bin/*; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| nixpkgs = (import <nixpkgs> {}).pkgs.fetchFromGitHub { | |
| owner = "nixos"; | |
| repo = "nixpkgs"; | |
| rev = "964665eb1c75e0bb596e08a92a6c872b5ae06a31"; | |
| sha256 = "11f0hrc9ayba0qqbwrxp7i4nk6vr0vn21943b6c3x8ffdhsl0jzx"; | |
| }; | |
| in import nixpkgs {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| packageOverrides = pkgs: { | |
| haskell = pkgs.haskell // { | |
| packages = pkgs.haskell.packages // { | |
| ghc7103 = pkgs.haskell.packages.ghc7103 // { | |
| Glob = pkgs.haskell.lib.overrideCabal pkgs.haskell.packages.ghc7103.Glob (args: { | |
| buildDepends = (args.buildDepends or []) ++ [pkgs.haskell.packages.ghc7103.semigroups]; | |
| }); | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| packageOverrides = pkgs: { | |
| haskell = pkgs.haskell // { | |
| packages = pkgs.haskell.packages // { | |
| ghc7103 = pkgs.haskell.packages.ghc7103.override { | |
| overrides = self: super: { | |
| Glob = pkgs.haskell.lib.overrideCabal super.Glob (args: { | |
| buildDepends = (args.buildDepends or []) ++ [self.semigroups]; | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| # Imports | |
| nixpkgs = import <nixpkgs> {}; | |
| inherit (nixpkgs) lib; | |
| inherit (lib) mapAttrs fix extends; | |
| # Helpers | |
| makeExtendable = base: | |
| fix base // { | |
| extend = f: makeExtendable (extends f base); |