From adbb6de170e6a3215b461798e5cfdd823bd01e45 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 24 Feb 2015 21:54:52 +0100 Subject: use haskell-ng --- Makefile | 4 ++-- README | 2 +- cgserver.nix | 21 ++++++++------------- env.nix | 10 +++++----- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index e2fad80..ac2adc9 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,10 @@ all: cgserver.nix build: - load-env-cgserver-1 cabal build + load-env-cgserver-2 cabal build doc: - load-env-cgserver-1 cabal haddock --executable + load-env-cgserver-2 cabal haddock --executable env: nix-env -f env.nix -i diff --git a/README b/README index 93ce42b..cc7680b 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ cgserver cgserver is a HTTP server that provides an API to manage cgroups. -Note: This package requires nixos-14.11 (nixos-unstable). +Note: This package was only tested with nixos-15.05 (nixos-unstable). Files in this Repository diff --git a/cgserver.nix b/cgserver.nix index bd8d12b..28c4b16 100644 --- a/cgserver.nix +++ b/cgserver.nix @@ -1,21 +1,16 @@ -# This file was auto-generated by cabal2nix. Please do NOT edit manually! - -{ cabal, aeson, attoparsec, filepath, httpTypes, ioStreams, safe -, text, wai, waiExtra, warp +{ mkDerivation, aeson, attoparsec, base, bytestring, containers +, directory, filepath, http-types, io-streams, safe, stdenv, text +, wai, wai-extra, warp }: - -cabal.mkDerivation (self: { +mkDerivation { pname = "cgserver"; version = "0.1.0.0"; src = ./.; isLibrary = false; isExecutable = true; buildDepends = [ - aeson attoparsec filepath httpTypes ioStreams safe text wai - waiExtra warp + aeson attoparsec base bytestring containers directory filepath + http-types io-streams safe text wai wai-extra warp ]; - meta = { - license = self.stdenv.lib.licenses.bsd3; - platforms = self.ghc.meta.platforms; - }; -}) + license = stdenv.lib.licenses.bsd3; +} diff --git a/env.nix b/env.nix index 303f718..b0f5c05 100644 --- a/env.nix +++ b/env.nix @@ -1,8 +1,8 @@ { pkgs ? import {} }: let - name = "cgserver"; - version = "1"; + pname = "cgserver"; + version = "2"; buildInputs = with pkgs; [ hsEnv @@ -12,15 +12,15 @@ let $(grep export ${hsEnv.outPath}/bin/ghc) ''; - hsEnv = pkgs.haskellPackages_ghc783_profiling.ghcWithPackages + hsEnv = pkgs.haskellngPackages.ghcWithPackages (self: with self; (callPackage ./cgserver.nix {}).nativeBuildInputs ++ [ - cabalInstall + cabal-install ] ); in pkgs.myEnvFun { - name = "${name}-${version}"; + name = "${pname}-${version}"; inherit buildInputs extraCmds; } -- cgit v1.2.3