summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2024-06-05 13:55:17 +0200
committertv <tv@krebsco.de>2024-06-05 13:55:17 +0200
commit401f0e115928df34da18d99e3560ecb83254f1b5 (patch)
tree1fca24d5a37ede08b1f2a138ec1eaa5483a6d4ae
parent0f5512c06dc41d67f3829846ea13da6be1597a99 (diff)
cabal-read: emigrate
-rw-r--r--krebs/5pkgs/simple/cabal-read.nix39
1 files changed, 0 insertions, 39 deletions
diff --git a/krebs/5pkgs/simple/cabal-read.nix b/krebs/5pkgs/simple/cabal-read.nix
deleted file mode 100644
index 03b42ef2c..000000000
--- a/krebs/5pkgs/simple/cabal-read.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{ writeHaskellPackage }:
-
-# Because `sed -n 's/.*\<ghc-options:\s\+\(.*\)/\1/p'` is too simple.
-writeHaskellPackage "cabal-read" {
- executables.ghc-options = {
- extra-depends = ["Cabal"];
- text = /* haskell */ ''
- {-# LANGUAGE CPP #-}
- module Main (main) where
- import Data.List
- import Data.Maybe
- import Distribution.Compiler
- import Distribution.PackageDescription.Parsec
- import Distribution.Types.BuildInfo
- import Distribution.Types.CondTree
- import Distribution.Types.Executable
- import Distribution.Types.GenericPackageDescription
- import Distribution.Types.UnqualComponentName
- import Distribution.Verbosity
- import System.Environment
- main :: IO ()
- main = do
- [path, name] <- getArgs
-
- desc <- readGenericPackageDescription normal path
-
- case lookup (mkUnqualComponentName name) (condExecutables desc) of
- Just exe ->
- putStrLn . intercalate " " . fromMaybe [] . lookup GHC
- #if MIN_VERSION_Cabal(3,0,0)
- . perCompilerFlavorToList
- #endif
- . options . buildInfo . condTreeData $ exe
-
- Nothing ->
- error ("executable " <> name <> " not found in " <> path)
- '';
- };
-}