8b4c137a3b
Nix can accept (nearly?) arbitrary values as attributes, if they are quoted in strings. So generating “dots” should always result in valid nix attributes. This uses the same regex as the nix lexer (as of 1.11). Also add a few tests whether it correctly generates symbol/non-symbol attributes.
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ mkDerivation, ansi-wl-pprint, base, containers, data-fix, deepseq
|
|
, parsers, stdenv, tasty, tasty-hunit, tasty-th, text, transformers
|
|
, trifecta, unordered-containers, criterion, pkgs, deriving-compat
|
|
, regex-tdfa, regex-tdfa-text
|
|
}:
|
|
|
|
let
|
|
inherit (builtins) filterSource;
|
|
inherit (pkgs.lib) elem;
|
|
in
|
|
|
|
mkDerivation {
|
|
pname = "hnix";
|
|
version = "0.3.4";
|
|
src = let
|
|
notNamed = list: name: !(elem (baseNameOf name) list);
|
|
in filterSource (n: _: notNamed [".git" "dist" "benchmarks"] n) ./.;
|
|
isLibrary = true;
|
|
isExecutable = true;
|
|
libraryHaskellDepends = [
|
|
ansi-wl-pprint base containers data-fix deepseq parsers text
|
|
transformers trifecta unordered-containers criterion deriving-compat
|
|
regex-tdfa regex-tdfa-text
|
|
];
|
|
executableHaskellDepends = [
|
|
ansi-wl-pprint base containers data-fix deepseq
|
|
];
|
|
testHaskellDepends = [
|
|
base containers data-fix tasty tasty-hunit tasty-th text
|
|
];
|
|
homepage = "http://github.com/jwiegley/hnix";
|
|
description = "Haskell implementation of the Nix language";
|
|
license = stdenv.lib.licenses.bsd3;
|
|
}
|