parent
d06c3e06e5
commit
cf5e2d5103
@ -0,0 +1,28 @@ |
||||
{ lib, haskellPackages, runCommand }: |
||||
|
||||
let |
||||
localRaw = haskellPackages.callCabal2nix "local" ./local {}; |
||||
in |
||||
lib.recurseIntoAttrs rec { |
||||
|
||||
helloFromCabalSdist = haskellPackages.buildFromCabalSdist haskellPackages.hello; |
||||
|
||||
# A more complicated example with a cabal hook. |
||||
hercules-ci-cnix-store = haskellPackages.buildFromCabalSdist haskellPackages.hercules-ci-cnix-store; |
||||
|
||||
localFromCabalSdist = haskellPackages.buildFromCabalSdist localRaw; |
||||
|
||||
assumptionLocalHasDirectReference = runCommand "localHasDirectReference" { |
||||
drvPath = builtins.unsafeDiscardOutputDependency localRaw.drvPath; |
||||
} '' |
||||
grep ${./local} $drvPath >/dev/null |
||||
touch $out |
||||
''; |
||||
|
||||
localHasNoDirectReference = runCommand "localHasNoDirectReference" { |
||||
drvPath = builtins.unsafeDiscardOutputDependency localFromCabalSdist.drvPath; |
||||
} '' |
||||
grep -v ${./local} $drvPath >/dev/null |
||||
touch $out |
||||
''; |
||||
} |
@ -0,0 +1,5 @@ |
||||
# Revision history for local |
||||
|
||||
## 0.1.0.0 -- YYYY-mm-dd |
||||
|
||||
* First version. Released on an unsuspecting world. |
@ -0,0 +1,4 @@ |
||||
module Main where |
||||
|
||||
main :: IO () |
||||
main = putStrLn "Hello, Haskell!" |
@ -0,0 +1,13 @@ |
||||
cabal-version: 2.4 |
||||
name: local |
||||
version: 0.1.0.0 |
||||
|
||||
synopsis: Nixpkgs test case |
||||
license: MIT |
||||
extra-source-files: CHANGELOG.md |
||||
|
||||
executable local |
||||
main-is: Main.hs |
||||
build-depends: base |
||||
hs-source-dirs: app |
||||
default-language: Haskell2010 |
Loading…
Reference in new issue