packages feed

nova-nix-0.11.0.0 / nova-nix.cabal

cabal-version:      3.0name:               nova-nixversion:            0.11.0.0synopsis:           Windows-native Nix implementation in Haskell and C99description:  An implementation of Nix for Windows, written in Haskell with a C99  data layer that keeps evaluation data off the GHC heap.  It also runs  on macOS and Linux.  It has its own parser, lazy evaluator, store,  derivation builder and binary-cache substituter, and does not need an  existing Nix installation.  On the derivations its CI checks, over pinned pairs of Nix and nixpkgs,  the derivation paths it computes match upstream's.  On Windows it builds  a toolchain from a 1,623-byte seed, through GNU Mes, TinyCC and GCC  4.6.4, 10 and 16, to the native x86_64 GCC its stdenv wraps, and builds  packages from source with it.  The project is experimental; see the  README for what is not implemented.  Evaluation runs in a session (@Nix.Eval.IO.withEvalSession@), which sets  up the C data layer it needs and tears it down as the session ends.  Built on @nova-cache@ for NAR serialization, narinfo handling, and  Ed25519-signed binary substitution.license:            Apache-2.0license-file:       LICENSEcopyright:          2026 Novavero AI Inc.author:             Devon Tomlinmaintainer:         devon.tomlin@novavero.aihomepage:           https://github.com/Novavero-AI/nova-nixbug-reports:        https://github.com/Novavero-AI/nova-nix/issuescategory:           Nix, Distribution, Systemstability:          experimentalbuild-type:         Simpletested-with:        GHC == 9.14.1extra-doc-files:    CHANGELOG.md    NOTICE    README.md-- C data-layer headers.  These are #included by the cbits/*.c sources-- (via include-dirs: cbits) but are not auto-added to the sdist by the-- c-sources field, so they must be listed here or the Hackage build-- fails with "nn_*.h: No such file or directory".extra-source-files:    cbits/*.h    sandbox/*.hdata-files:    develop/COPYING    develop/get-env.sh    nix/fetchurl.nixdata-dir: data-- ----------------------------------------------------------------------------- Library: core modules (parser, evaluator, store, builder, substituter)-- ---------------------------------------------------------------------------library  exposed-modules:    Nix.Expr    Nix.Expr.ClosureTrim    Nix.Expr.Resolve    Nix.Expr.Types    Nix.Parser    Nix.Parser.Expr    Nix.Parser.Internal    Nix.Parser.Lexer    Nix.Parser.ParseError    Nix.Eval    Nix.Eval.CallDepth    Nix.Eval.CanonPath    Nix.Eval.Context    Nix.Eval.Types    Nix.Eval.IO    Nix.Eval.Policy    Nix.Eval.RealiseContext    Nix.Eval.Operator    Nix.Eval.Print    Nix.Eval.SourceError    Nix.Eval.SourcePos    Nix.Eval.StartupSymbols    Nix.Eval.StringInterp    Nix.Eval.Symbol    Nix.Eval.AllocSite    Nix.Eval.Builtin    Nix.Eval.CAttrSet    Nix.Eval.CThunk    Nix.Eval.CEnv    Nix.Eval.CLambda    Nix.Eval.CPrimop    Nix.Eval.CRegion    Nix.Eval.CRoots    Nix.Eval.CList    Nix.Eval.CCtxStr    Nix.Eval.CStr    Nix.Eval.CBytecode    Nix.Eval.CStats    Nix.Eval.Compile    Nix.Eval.EvalFormals    Nix.Eval.AttrPath    Nix.Eval.AutoCall    Nix.Eval.CStatus    Nix.Eval.CData    Nix.Store    Nix.Store.Access    Nix.Store.Path    Nix.Store.Path.Internal    Nix.Store.DB    Nix.Store.GC    Nix.Store.Handle    Nix.Store.Import    Nix.Store.Lock    Nix.Store.Symlink    Nix.Store.CaseSensitive    Nix.Store.EntryName    Nix.Store.ExecBit    Nix.Store.Metadata    Nix.Store.Ops    Nix.Store.Upstream    Nix.DependencyGraph    Nix.Derivation    Nix.Derivation.StructuredAttrs    Nix.DrvName    Nix.Develop.Capture    Nix.Develop.Environment    Nix.Develop.Shell    Nix.Builder    Nix.Builder.BuildDir    Nix.Builder.BuildUser    Nix.Builder.Buildenv    Nix.Builder.Cores    Nix.Builder.Log    Nix.Builder.Sandbox    Nix.Builder.Sandbox.Spawn    Nix.Builder.Settings    Nix.Builder.Unpack    Nix.CacheDirectory    Nix.Compression    Nix.Compression.Stream    Nix.Config    Nix.Daemon.Auth    Nix.Daemon.Client    Nix.Daemon.ClientStore    Nix.Daemon.Connection    Nix.Daemon.Dial    Nix.Daemon.Listen    Nix.Daemon.LocalStore    Nix.Daemon.Ops    Nix.Daemon.Protocol    Nix.Daemon.StoreChoice    Nix.Daemon.Wire    Nix.Environment    Nix.ExperimentalFeature    Nix.Fetch.Archive    Nix.Fetch.Attrs    Nix.Fetch.Download    Nix.Fetch.Input    Nix.Fetch.Tar    Nix.Fetch.Tree    Nix.Fetch.Url    Nix.Flake.Ref    Nix.HostPath    Nix.Profile.Generation    Nix.Profile.Manifest    Nix.Profile.Tree    Nix.Push    Nix.Push.Directory    Nix.Push.Source    Nix.Realise    Nix.Substituter    Nix.Trust    Nix.Trust.Fetch    Nix.Trust.Scan    Nix.Builtins    Nix.Hash    Nix.Http    Nix.Json    Nix.Key    Nix.Logger    Nix.Signals  autogen-modules:  Paths_nova_nix  other-modules:    Nix.Builder.Job    Nix.Eval.Arena    Nix.Store.Exclusive    Paths_nova_nix  build-depends:      base                >= 4.22 && < 5    , array               >= 0.5 && < 0.6    , binary              >= 0.8 && < 0.9    , bytestring          >= 0.11 && < 0.13    , containers          >= 0.6.0.1 && < 0.9    , crypton             >= 1.1 && < 2    -- 1.3.9 is the first whose removePathForcibly works relative to each    -- directory's descriptor and never follows a link, which removing a    -- sandbox's chroot relies on.    , directory           >= 1.3.9 && < 1.4    , filepath            >= 1.4.100 && < 1.6    , http-client         >= 0.7 && < 0.8    , http-client-tls     >= 0.3 && < 0.5    , http-types          >= 0.12 && < 0.13    , ram                 >= 0.20 && < 1    , filelock            >= 0.1.1 && < 0.2    , mtl                 >= 2.2 && < 2.4    , network             >= 3.2 && < 3.3    , nova-cache:{nova-cache, xz, zstandard, bzip2} >= 0.14 && < 0.15    -- 1.6.8 is the first whose OpenExtHandle holds the process and its    -- job alone, the job a Windows builder's limit is set on    -- (Nix.Builder.Job).    , process             >= 1.6.8 && < 1.7    , random              >= 1.2 && < 1.4    , regex-tdfa          >= 1.3 && < 1.4    -- Nix.Store.DB wraps a read-only direct-sqlite handle in Connection,    -- whose two fields 0.4.19 introduced (0.4.18 has one) in a minor    -- release, so the bound holds to the release whose shape is known.    , sqlite-simple       >= 0.4.19 && < 0.4.20    -- 2.3.28 is the first whose open2 opens a database read-only, which a    -- store's queries for a read-only evaluation do.    , direct-sqlite       >= 2.3.28 && < 2.4    , tar                 >= 0.7.1 && < 0.8    , text                >= 2.0 && < 2.2    , time                >= 1.9 && < 1.17    -- 0.7 is the first whose Codec.Compression.GZip exports the    -- DecompressError a corrupt stream throws, which builtin:unpack catches.    , zlib                >= 0.7 && < 0.8    , zstd                >= 0.1 && < 0.2  -- Platform calls base cannot express: the exclusive create behind NAR  -- unpacking (Nix.Store.Exclusive), reading the environment as bytes on  -- POSIX (Nix.Environment; getenv, as upstream reads it), where Windows  -- reads it through base's UTF-16 API, marking a builder's log pipe  -- close-on-exec on POSIX (Nix.Builder.Log), creating a store or build  -- directory with its mode on POSIX, and on Windows raising a failure to  -- create one as the IOError base raises (Nix.Store.Access), a  -- registered path's modes, times and owner (Nix.Store.Metadata), on  -- POSIX a develop shell's temporary files, environment and exec  -- (Nix.Develop.Shell), a build user's lookup, lock file and files  -- (Nix.Builder.BuildUser), and on Windows the daemon's named pipe and  -- the accounts its clients are named by (Nix.Daemon.Pipe).  -- Win32 2.12 is the first whose setFileTime leaves a time it is not  -- given as it is; unix 2.8 is the first whose openFd takes creat and  -- cloexec in its flags.  advapi32 holds the token, account and  -- security-descriptor calls cbits/nn_winfs.c makes, and authz the  -- groups it computes for an account.  if os(windows)    build-depends:        Win32             >= 2.12 && < 2.15    exposed-modules:        Nix.Daemon.Pipe    other-modules:        Nix.Store.Win32Path    extra-libraries:        advapi32        authz  else    build-depends:        unix              >= 2.8 && < 2.9  c-sources:    cbits/nn_symbol.c    cbits/nn_str.c    cbits/nn_attrset.c    cbits/nn_thunk.c    cbits/nn_env.c    cbits/nn_list.c    cbits/nn_ctxstr.c    cbits/nn_arena.c    cbits/nn_bytecode.c    cbits/nn_lambda.c    cbits/nn_primop.c    cbits/nn_roots.c    cbits/nn_region.c    cbits/nn_graph.c    cbits/nn_stats.c    cbits/nn_tracker.c    cbits/nn_winfs.c    cbits/nn_darwinfs.c    cbits/nn_cpus.c    cbits/nn_buildusers.c    cbits/nn_hangup.c  include-dirs:     cbits  -- -Werror deliberately NOT baked in: a future gcc/clang adding a new  -- -Wall diagnostic must not retroactively break installing published  -- releases.  CI enforces warnings-as-errors via its C99-strict job.  cc-options:       -std=c99 -Wall -Wextra -pedantic  hs-source-dirs:   src  default-language:  Haskell2010  default-extensions:    BangPatterns    OverloadedStrings  ghc-options:    -Wall    -Wcompat    -Wincomplete-record-updates    -Wincomplete-uni-patterns    -- GHC 9.14 deprecates the pattern namespace specifier in import and    -- export lists in favour of data, but hlint (through 3.10) cannot    -- parse the replacement.  The old spelling stays, warning muted,    -- until hlint learns it (then: pattern -> data, drop these flags).    -Wno-pattern-namespace-specifier    -- The evaluator in Nix.Eval is written over any MonadEval.  These two    -- let the SPECIALIZE pragmas in Nix.Eval.IO compile all of it for    -- EvalIO: each function's code is visible to the modules importing    -- it, and an overloaded function is specialised to the monad its    -- caller knows, not only one marked INLINABLE.  profiling/stress.nix,    -- fib 30 and two million selects or elemAts run 1.7 to 2.4 times as    -- fast, allocating 40 to 50% less, for a library build about 13%    -- longer.    -fspecialise-aggressively    -fexpose-all-unfoldings-- ----------------------------------------------------------------------------- CLI library: the command line's grammar and reference, which the-- executable runs and the test suite checks.  A sublibrary is private, so-- none of it is the package's published API.-- ---------------------------------------------------------------------------library cli  exposed-modules:    Nix.Cli.Args    Nix.Cli.Reference  hs-source-dirs:   cli  default-language:  Haskell2010  default-extensions:    OverloadedStrings  ghc-options:      -Wall -Wcompat  build-depends:      base                >= 4.22 && < 5    , bytestring          >= 0.11 && < 0.13    , containers          >= 0.6 && < 0.9    , filepath            >= 1.4.100 && < 1.6    , nova-nix    , text                >= 2.0 && < 2.2-- ----------------------------------------------------------------------------- CLI executable-- ---------------------------------------------------------------------------executable nova-nix  main-is:          Main.hs  hs-source-dirs:   app  autogen-modules:  Paths_nova_nix  other-modules:    Paths_nova_nix  default-language:  Haskell2010  default-extensions:    OverloadedStrings  ghc-options:      -Wall -Wcompat -threaded -rtsopts  -- file-io reads a config file, and on Linux /proc/mounts,  -- /proc/self/cgroup and a cgroup's cpu.max, by the bytes of its path.  0.1.1 is the first whose read does not create a  -- missing file on Windows, which would turn a missing include into an  -- empty one.  build-depends:      base                >= 4.22 && < 5    , bytestring          >= 0.11 && < 0.13    , containers          >= 0.6 && < 0.9    , directory           >= 1.3.8 && < 1.4    , file-io             >= 0.1.1 && < 0.2    , filepath            >= 1.4.100 && < 1.6    , mtl                 >= 2.2 && < 2.4    , nova-cache          >= 0.14 && < 0.15    , nova-nix    , nova-nix:cli    , text                >= 2.0 && < 2.2-- ----------------------------------------------------------------------------- Sandbox helper: the program every sandboxed build runs through.  Its-- core, sandbox/nova-nix-sandbox.c, reads the plan and reports a failed-- step as every OS does, and links the backend for the OS it is built-- for (sandbox/backend.h), which makes the sandbox: on Linux,-- sandbox/linux.c, namespaces and a chroot, set up between their creation-- and the builder's exec, where nova-nix itself can run nothing; on-- macOS, sandbox/darwin.c, a profile applied in the builder's process-- before its exec; both share sandbox/posix.c.  On Windows,-- sandbox/windows.c starts the builder as a build slot's account, on the-- window station of the slot's logon, in a job, and ends the slot's-- processes before and after the build, which takes advapi32's token-- calls.  The runtime it links is never started.  nova-nix finds it-- beside itself.-- ---------------------------------------------------------------------------executable nova-nix-sandbox  main-is:          nova-nix-sandbox.c  hs-source-dirs:   sandbox  c-sources:        sandbox/plan.c  default-language:  Haskell2010  cc-options:       -std=c99 -Wall -Wextra -pedantic  build-depends:      base                >= 4.22 && < 5  if os(linux)    c-sources:      sandbox/linux.c sandbox/mountinfo.c sandbox/posix.c  elif os(darwin)    c-sources:      sandbox/darwin.c sandbox/posix.c  elif os(windows)    c-sources:      sandbox/windows.c    extra-libraries:        advapi32  else    buildable: False-- ----------------------------------------------------------------------------- Tests-- ---------------------------------------------------------------------------test-suite nova-nix-test  type:             exitcode-stdio-1.0  main-is:          Main.hs  hs-source-dirs:   test  other-modules:    CacheFixture    DaemonLink    DirDacl    HttpFixture    NodeStatus    Test.Archive    Test.Builder    Test.BuildUser    Test.CData    Test.Cli    Test.Daemon    Test.DaemonClient    Test.DaemonPipe    Test.DaemonStore    Test.Derivation    Test.Eval    Test.Exceptions    Test.Fetch    Test.Harness    Test.Key    Test.Parser    Test.Pkgs    Test.Push    Test.Realise    Test.Store    Test.StoreChoice    Test.Substituter    Test.Trust    Test.WindowsSandbox    UserResources  default-language: Haskell2010  default-extensions:    OverloadedStrings  -- -threaded: the path-lock race tests hold a blocking OS file lock in  -- one thread while another waits on it, which needs real concurrency  -- under blocking foreign calls.  ghc-options:      -Wall -Wcompat -Wno-pattern-namespace-specifier -threaded  -- The sandbox helper's parsers, which the suite holds to the plans the  -- library renders and the mount tables it reads, the key the Linux  -- sandbox tests plant, the wait for a process the build user tests  -- expect killed, and the Windows calls the Windows sandbox tests make,  -- which build elsewhere as stubs.  No -std or -pedantic: GHC  -- compiles the C it generates for the executable's link with these  -- options too, and the RTS headers it includes are not strict C99; the  -- C99-strict CI job compiles these sources that way.  c-sources:        sandbox/plan.c sandbox/mountinfo.c test/cbits/sandbox_check.c test/cbits/keyring.c test/cbits/process_wait.c test/cbits/nn_test_sandbox_windows.c  include-dirs:     sandbox  cc-options:       -Wall -Wextra  build-depends:      base                >= 4.22 && < 5    , async               >= 2.2 && < 2.3    , bytestring          >= 0.11 && < 0.13    , containers          >= 0.6 && < 0.9    , mtl                 >= 2.2 && < 2.4    , directory           >= 1.3 && < 1.4    , filelock            >= 0.1.1 && < 0.2    , filepath            >= 1.4.100 && < 1.6    , http-client         >= 0.7 && < 0.8    , http-types          >= 0.12 && < 0.13    , network             >= 3.2 && < 3.3    , nova-cache:{nova-cache, zstandard} >= 0.14 && < 0.15    , nova-nix    , nova-nix:cli    , process             >= 1.6.12 && < 1.7    , QuickCheck          >= 2.12.5 && < 2.19    , sqlite-simple       >= 0.4 && < 0.5    , tar                 >= 0.7.1 && < 0.8    , text                >= 2.0 && < 2.2    , time                >= 1.9 && < 1.17    , zlib                >= 0.7 && < 0.8    , zstd                >= 0.1 && < 0.2  -- On Windows the store access tests read a directory's DACL back  -- through advapi32 (DirDacl), the daemon's pipe tests make tokens and  -- pipes with the owners they name through advapi32 (Test.DaemonPipe),  -- and the sandbox tests make build accounts through netapi32 and  -- advapi32, their passwords through bcrypt, and a test service through  -- advapi32, and read and open window stations through user32;  -- elsewhere the store metadata tests read lstat (NodeStatus): a node's  -- group and other bits, and a symlink's own time.  if os(windows)    c-sources:        test/cbits/nn_test_dacl.c        test/cbits/nn_test_pipe_owner.c    cc-options:       -std=c99 -Wall -Wextra -pedantic    extra-libraries:        advapi32        bcrypt        netapi32        user32  else    build-depends:        unix              >= 2.8 && < 2.9-- ----------------------------------------------------------------------------- Benchmarks-- ----------------------------------------------------------------------------- What an attribute set costs held in C and held in GHC's heap, for-- profiling/bench.sh's memory suite, which says how to run it.benchmark attrset-memory  type:             exitcode-stdio-1.0  main-is:          AttrSetMemory.hs  hs-source-dirs:   profiling  c-sources:        profiling/heap-in-use.c  default-language: Haskell2010  -- -threaded: the non-moving collector marks beside the program there,  -- as it would beside the evaluator.  -T: the figures are the RTS's.  ghc-options:      -Wall -Wcompat -threaded -rtsopts "-with-rtsopts=-T"  build-depends:      base                >= 4.22 && < 5    , bytestring          >= 0.11 && < 0.13    , nova-nix    , primitive           >= 0.9 && < 0.10    , text                >= 2.0 && < 2.2source-repository head  type:     git  location: https://github.com/Novavero-AI/nova-nix  branch:   main