-
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.
* Update and add flake * [WIP] try make nodePackages.nodejs overridable
- Loading branch information
Showing
8 changed files
with
1,548 additions
and
119 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
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 |
---|---|---|
|
@@ -7,3 +7,7 @@ generated-docs/ | |
.purs* | ||
.psa* | ||
.spago | ||
|
||
.envrc | ||
.direnv | ||
result |
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,42 @@ | ||
{ stdenvNoCC | ||
, writeText | ||
, purix | ||
, esbuild | ||
, purs-backend-es | ||
, nodePackages | ||
}: | ||
|
||
let | ||
|
||
spagoLock = purix.buildSpagoLock { | ||
src = ./.; | ||
lockfile = ./spago.lock; | ||
corefn = true; | ||
}; | ||
|
||
inherit (nodePackages) nodejs; | ||
|
||
in | ||
|
||
stdenvNoCC.mkDerivation rec { | ||
pname = "kak-jump"; | ||
version = "0.2.1"; | ||
|
||
src = ./.; | ||
|
||
nativeBuildInputs = [ purs-backend-es esbuild ]; | ||
|
||
buildPhase = '' | ||
cp -r ${spagoLock.kak-jump}/output . | ||
purs-backend-es build | ||
purs-backend-es bundle-app --platform=node | ||
''; | ||
|
||
installPhase = '' | ||
mkdir $out | ||
substituteInPlace jump.kak --replace node "${nodejs}/bin/node" | ||
cp jump.kak package.json performJump.js index.js $out | ||
''; | ||
|
||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,62 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
purescript-overlay = { | ||
url = "github:thomashoneyman/purescript-overlay"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
}; | ||
|
||
outputs = inputs@{ self, nixpkgs, ... }: | ||
let | ||
supportedSystems = [ | ||
"x86_64-linux" | ||
"aarch64-linux" | ||
"x86_64-darwin" | ||
"aarch64-darwin" | ||
]; | ||
|
||
forAllSystems = inputs.nixpkgs.lib.genAttrs supportedSystems; | ||
|
||
nixpkgsFor = forAllSystems (system: import inputs.nixpkgs { | ||
inherit system; | ||
config = {}; | ||
overlays = builtins.attrValues inputs.self.overlays; | ||
}); | ||
in | ||
{ | ||
overlays = { | ||
purescript = inputs.purescript-overlay.overlays.default; | ||
}; | ||
|
||
packages = forAllSystems (system: | ||
let pkgs = nixpkgsFor.${system}; in { | ||
default = pkgs.callPackage ./default.nix { nodePackages = pkgs.nodePackages_latest; }; | ||
}); | ||
|
||
devShells = forAllSystems (system: | ||
let pkgs = nixpkgsFor.${system}; in { | ||
default = pkgs.mkShell { | ||
name = "kak-jump devshell"; | ||
inputsFrom = builtins.attrValues self.packages.${system}; | ||
buildInputs = with pkgs; [ | ||
# kakoune | ||
kakoune-unwrapped | ||
|
||
# node | ||
nodejs-slim_21 | ||
esbuild | ||
|
||
# purescript | ||
purs | ||
spago-unstable | ||
purs-tidy | ||
purs-backend-es | ||
purescript-language-server | ||
]; | ||
}; | ||
}); | ||
|
||
}; | ||
} | ||
|
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
Oops, something went wrong.