forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elmPackages.elm-pages: init at 2.1.11
`node-packages.nix` was regenerated after having run `generate-node-packages.sh` in order to pick up dependencies for `elm-pages`. In addition, we add `elm`, `elm-review`, and `elm-optimize-level-2` to the `PATH` for `elm-pages` since those are needed at runtime. A patch is also included to fix an issue where files are copied from the `nix-store` as read-only (credit to @bcardiff for that fix). An upstream issue dillonkearns/elm-pages#305 has been opened to track this.
- Loading branch information
1 parent
631fb48
commit d29cd82
Showing
5 changed files
with
1,162 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
pkgs/development/compilers/elm/packages/elm-pages-fix-read-only.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
diff --git a/generator/src/codegen.js b/generator/src/codegen.js | ||
index a0ef8806e..fe00ac904 100644 | ||
--- a/generator/src/codegen.js | ||
+++ b/generator/src/codegen.js | ||
@@ -20,33 +20,33 @@ async function generate(basePath) { | ||
|
||
const uiFileContent = elmPagesUiFile(); | ||
await Promise.all([ | ||
- fs.promises.copyFile( | ||
- path.join(__dirname, `./Page.elm`), | ||
- `./.elm-pages/Page.elm` | ||
+ fs.promises.writeFile( | ||
+ `./.elm-pages/Page.elm`, | ||
+ fs.readFileSync(path.join(__dirname, `./Page.elm`)) | ||
), | ||
- fs.promises.copyFile( | ||
- path.join(__dirname, `./elm-application.json`), | ||
- `./elm-stuff/elm-pages/elm-application.json` | ||
+ fs.promises.writeFile( | ||
+ `./elm-stuff/elm-pages/elm-application.json`, | ||
+ fs.readFileSync(path.join(__dirname, `./elm-application.json`)) | ||
), | ||
- fs.promises.copyFile( | ||
- path.join(__dirname, `./Page.elm`), | ||
- `./elm-stuff/elm-pages/.elm-pages/Page.elm` | ||
+ fs.promises.writeFile( | ||
+ `./elm-stuff/elm-pages/.elm-pages/Page.elm`, | ||
+ fs.readFileSync(path.join(__dirname, `./Page.elm`)) | ||
), | ||
- fs.promises.copyFile( | ||
- path.join(__dirname, `./SharedTemplate.elm`), | ||
- `./.elm-pages/SharedTemplate.elm` | ||
+ fs.promises.writeFile( | ||
+ `./.elm-pages/SharedTemplate.elm`, | ||
+ fs.readFileSync(path.join(__dirname, `./SharedTemplate.elm`)) | ||
), | ||
- fs.promises.copyFile( | ||
- path.join(__dirname, `./SharedTemplate.elm`), | ||
- `./elm-stuff/elm-pages/.elm-pages/SharedTemplate.elm` | ||
+ fs.promises.writeFile( | ||
+ `./elm-stuff/elm-pages/.elm-pages/SharedTemplate.elm`, | ||
+ fs.readFileSync(path.join(__dirname, `./SharedTemplate.elm`)) | ||
), | ||
- fs.promises.copyFile( | ||
- path.join(__dirname, `./SiteConfig.elm`), | ||
- `./.elm-pages/SiteConfig.elm` | ||
+ fs.promises.writeFile( | ||
+ `./.elm-pages/SiteConfig.elm`, | ||
+ fs.readFileSync(path.join(__dirname, `./SiteConfig.elm`)) | ||
), | ||
- fs.promises.copyFile( | ||
- path.join(__dirname, `./SiteConfig.elm`), | ||
- `./elm-stuff/elm-pages/.elm-pages/SiteConfig.elm` | ||
+ fs.promises.writeFile( | ||
+ `./elm-stuff/elm-pages/.elm-pages/SiteConfig.elm`, | ||
+ fs.readFileSync(path.join(__dirname, `./SiteConfig.elm`)) | ||
), | ||
fs.promises.writeFile("./.elm-pages/Pages.elm", uiFileContent), | ||
// write `Pages.elm` with cli interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
"elm-xref", | ||
"create-elm-app", | ||
"elm-optimize-level-2", | ||
"elm-pages", | ||
"elm-review", | ||
"elm-git-install" | ||
] |
Oops, something went wrong.