Skip to content

Commit 2a48e40

Browse files
authored
Merge pull request haskell#10435 from haskell/mergify/bp/3.14/pr-10417
Fix ./setup install comand (backport haskell#10417)
2 parents fa0c960 + dadd9ce commit 2a48e40

File tree

7 files changed

+49
-0
lines changed

7 files changed

+49
-0
lines changed

Cabal/src/Distribution/Simple.hs

Lines changed: 1 addition & 0 deletions
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
Lines changed: 5 additions & 0 deletions
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.
Lines changed: 18 additions & 0 deletions
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: [email protected]
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
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain
Lines changed: 8 additions & 0 deletions
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" []
Lines changed: 4 additions & 0 deletions
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

Lines changed: 11 additions & 0 deletions
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)