-
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.
- Loading branch information
1 parent
266f44f
commit f2ae35d
Showing
4 changed files
with
145 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -29,4 +29,4 @@ pnpm-debug.log* | |
|
||
# macOS-specific files | ||
.DS_Store | ||
|
||
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,23 @@ | ||
{ domain, mkPnpmPackage, pkg-config, vips, nodePackages_latest}: | ||
|
||
mkPnpmPackage { | ||
src = ./.; | ||
|
||
installInPlace = true; | ||
|
||
postPatch = '' | ||
substituteInPlace ascii.config.ts \ | ||
--replace 'ascii.coffee' '${domain}' | ||
''; | ||
|
||
script = "build"; | ||
|
||
nativeBuildInputs = [pkg-config vips nodePackages_latest.pnpm]; | ||
buildInputs = [pkg-config vips nodePackages_latest.pnpm]; | ||
|
||
|
||
installPhase = '' | ||
mkdir -p $out/bin | ||
cp -r ./dist/* $out/bin/ | ||
''; | ||
} |
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,36 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
pnpm2nix = { | ||
url = "github:nzbr/pnpm2nix-nzbr"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
inputs.flake-utils.follows = "flake-utils"; | ||
}; | ||
|
||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, pnpm2nix, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem | ||
(system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
package-ascii-coffee = pkgs.callPackage ./derivation.nix { | ||
domain = "ascii.coffee"; | ||
mkPnpmPackage = pnpm2nix.packages."${system}".mkPnpmPackage; | ||
}; | ||
in | ||
rec { | ||
checks = packages; | ||
packages = { | ||
ascii-coffee-website = package-ascii-coffee; | ||
default = package-ascii-coffee; | ||
}; | ||
} | ||
) // { | ||
overlays.default = final: prev: { | ||
inherit (self.packages.${prev.system}) | ||
ascii-coffee-website; | ||
}; | ||
}; | ||
} |