packages feed

nix (empty) → 0.1.0.0

raw patch · 6 files changed

+109/−0 lines, 6 filesdep +basedep +relude

Dependencies added: base, relude

Files

+ CHANGELOG.md view
@@ -0,0 +1,5 @@+# Changelog for nix++## 0.1.0.0++- Initial release
+ README.md view
@@ -0,0 +1,6 @@+# nix++Haskell wrapper for the Nix CLI providing a clean API for interacting with Nix commands and environments.++> [!NOTE]+> Work in progress. More features will be added.
+ nix.cabal view
@@ -0,0 +1,67 @@+cabal-version: 2.0++-- This file has been generated from package.yaml by hpack version 0.38.2.+--+-- see: https://github.com/sol/hpack++name:           nix+version:        0.1.0.0+synopsis:       Haskell wrapper for the Nix CLI+description:    A Haskell library providing a nice wrapper for the Nix CLI.+category:       System+homepage:       https://github.com/juspay/vira/tree/main/packages/nix+author:         Sridhar Ratnakumar+maintainer:     srid@srid.ca+copyright:      2025 Sridhar Ratnakumar+license:        MIT+build-type:     Simple+extra-source-files:+    README.md+    CHANGELOG.md++library+  exposed-modules:+      System.Nix+      System.Nix.Flake.Develop+      System.Nix.System+  other-modules:+      Paths_nix+  autogen-modules:+      Paths_nix+  hs-source-dirs:+      src+  default-extensions:+      DataKinds+      DeriveDataTypeable+      DeriveGeneric+      DeriveTraversable+      DerivingStrategies+      DerivingVia+      ExplicitForAll+      FlexibleContexts+      FlexibleInstances+      GeneralizedNewtypeDeriving+      ImportQualifiedPost+      LambdaCase+      MultiParamTypeClasses+      MultiWayIf+      NamedFieldPuns+      NoStarIsType+      NumericUnderscores+      OverloadedStrings+      ScopedTypeVariables+      StrictData+      TypeApplications+      TypeFamilies+      TypeOperators+      TypeSynonymInstances+      ViewPatterns+  ghc-options: -Wall -optP-Wno-nonportable-include-path -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wunused-foralls -fprint-explicit-foralls -fprint-explicit-kinds+  build-depends:+      base ==4.*+    , relude >=1.0+  mixins:+      base hiding (Prelude)+    , relude (Relude as Prelude, Relude.Container.One)+    , relude +  default-language: GHC2021
+ src/System/Nix.hs view
@@ -0,0 +1,8 @@+-- | Haskell wrapper for the Nix CLI+module System.Nix (+  module System.Nix.Flake.Develop,+  module System.Nix.System,+) where++import System.Nix.Flake.Develop+import System.Nix.System
+ src/System/Nix/Flake/Develop.hs view
@@ -0,0 +1,13 @@+-- | Working with @nix develop@+module System.Nix.Flake.Develop (+  inNixShell,+) where++{- | Check if running inside a nix develop shell++This function checks for the IN_NIX_SHELL environment variable,+which is set by @nix develop@.+-}+inNixShell :: (MonadIO m) => m Bool+inNixShell = do+  isJust <$> lookupEnv "IN_NIX_SHELL"
+ src/System/Nix/System.hs view
@@ -0,0 +1,10 @@+-- | Nix system information+module System.Nix.System (+  nixSystem,+) where++import System.Info qualified as SysInfo++-- | Get the current Nix system string (e.g., "x86_64-linux", "aarch64-darwin")+nixSystem :: Text+nixSystem = toText SysInfo.arch <> "-" <> toText SysInfo.os