Skip to content

Commit 47139c5

Browse files
authored
Merge pull request #10417 from haskell/wip/t10416
Fix ./setup install comand
2 parents b1e842d + 2a178f2 commit 47139c5

File tree

7 files changed

+49
-0
lines changed

7 files changed

+49
-0
lines changed

Cabal/src/Distribution/Simple.hs

+1
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@ defaultInstallHook_setupHooks inst_hooks pkg_descr localbuildinfo _ flags = do
10941094
defaultRegisterFlags
10951095
{ regInPlace = installInPlace flags
10961096
, regPackageDB = installPackageDB flags
1097+
, registerCommonFlags = installCommonFlags flags
10971098
}
10981099
when (hasLibs pkg_descr) $
10991100
register pkg_descr localbuildinfo registerFlags
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revision history for DistPrefInstall
2+
3+
## 0.1.0.0 -- YYYY-mm-dd
4+
5+
* First version. Released on an unsuspecting world.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
cabal-version: 3.12
2+
name: DistPrefInstall
3+
version: 0.1.0.0
4+
license: NONE
5+
author: Matthew Pickering
6+
maintainer: matthewtpickering@gmail.com
7+
build-type: Simple
8+
extra-doc-files: CHANGELOG.md
9+
10+
common warnings
11+
ghc-options: -Wall
12+
13+
library
14+
import: warnings
15+
exposed-modules: MyLib
16+
build-depends: base
17+
hs-source-dirs: src
18+
default-language: Haskell2010
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Test.Cabal.Prelude
2+
3+
main = setupTest $ recordMode DoNotRecord $ withPackageDb $ do
4+
setup "configure" []
5+
setup "build" []
6+
setup "copy" []
7+
setup "install" []
8+
setup "sdist" []
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module MyLib (someFunc) where
2+
3+
someFunc :: IO ()
4+
someFunc = putStrLn "someFunc"

changelog.d/t10416

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
synopsis: Fix ./setup install command
2+
packages: Cabal
3+
prs: #10417
4+
issues: #10416
5+
significance: significant
6+
7+
description: {
8+
9+
- `./setup install` was failing with a `fromFlag NoFlag` error. It is now fixed.
10+
11+
}

0 commit comments

Comments
 (0)