This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +21
-699
lines changed Expand file tree Collapse file tree 9 files changed +21
-699
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,8 @@ with { pkgs = import ./nix {}; };
55# -> https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html
66
77rec
8- { function = pkgs . runCommand "build-function" { }
9- ''
10- cp ${ ./main.js } main.js
11- # Can't be called 'main' otherwise lambda tries to load it
12- cp ${ handler } /bin/deckdeckgo-handler main_hs
13- mkdir $out
14- ${ pkgs . zip } /bin/zip -r $out/function.zip main.js main_hs
15- '' ;
8+ { function =
9+ pkgs . wai-lambda . wai-lambda-js-build-lambda "${ handler } /bin/deckdeckgo-handler" ;
1610
1711 handler = pkgs . haskellPackagesStatic . deckdeckgo-handler ;
18- wai-lambda = pkgs . haskellPackages . wai-lambda ;
1912}
Original file line number Diff line number Diff line change 22with rec
33{ sources = import ./sources.nix ;
44 pkgs = import sources . nixpkgs { } ;
5+ wai-lambda = pkgs . callPackage "${ sources . wai-lambda } /nix/packages.nix" { } ;
56
67 pkgsStatic =
78 ( import "${ sources . static-haskell-nix } /survey"
@@ -12,18 +13,19 @@ with rec
1213 with
1314 { mkPackage = name : path :
1415 { "${ name } " =
15- pkgs' . haskell . lib . disableLibraryProfiling (
16- pkgs' . haskell . lib . disableExecutableProfiling (
17- pkgs' . haskell . lib . failOnAllWarnings (
16+ with pkgs' . haskell . lib ;
17+ disableLibraryProfiling (
18+ disableExecutableProfiling (
19+ failOnAllWarnings (
1820 super . callCabal2nix name ( pkgs' . lib . cleanSource path ) { }
1921 ) ) ) ;
2022 } ;
2123 } ;
2224
2325 super //
2426 mkPackage "deckdeckgo-handler" ../handler //
25- mkPackage "wai-lambda" ../ wai-lambda ;
26-
27+ ( mkPackage "wai-lambda" wai-lambda . wai-lambda-source
28+ ) ;
2729 } ;
2830 normalHaskellPackages = pkgsStatic . pkgsMusl . haskellPackages . override
2931 ( haskellOverride pkgsStatic . pkgsMusl ) ;
@@ -38,6 +40,6 @@ with rec
3840} ;
3941
4042pkgs //
41- { inherit haskellPackagesStatic haskellPackages sources ;
43+ { inherit haskellPackagesStatic haskellPackages sources wai-lambda ;
4244 inherit ( import sources . niv { } ) niv ;
4345}
Original file line number Diff line number Diff line change 11{
2+ "wai-lambda" : {
3+ "url" : " https://github.com/deckgo/wai-lambda/archive/7f139047addff89e9d30e55b7eebb07c0e846456.tar.gz" ,
4+ "owner" : " deckgo" ,
5+ "branch" : " master" ,
6+ "url_template" : " https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" ,
7+ "repo" : " wai-lambda" ,
8+ "type" : " tarball" ,
9+ "sha256" : " 0qqi6wlg8v35dkh6gh9mrj0kb9kpzrz2pc7k0dykk2ahcj6m22k6" ,
10+ "description" : " Haskell Webapps on AWS Lambda" ,
11+ "rev" : " 7f139047addff89e9d30e55b7eebb07c0e846456"
12+ },
213 "nixpkgs" : {
314 "url" : " https://github.com/NixOS/nixpkgs/archive/88ae8f7d55efa457c95187011eb410d097108445.tar.gz" ,
415 "owner" : " NixOS" ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments