-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
archtika: fix allow-import-from-derivation error for npm archtika: fix package formatting archtika: refactor package archtika: update GitHub hash for version 1.0.1
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 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,59 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
buildNpmPackage, | ||
importNpmLock, | ||
symlinkJoin, | ||
fetchFromGitHub, | ||
}: | ||
|
||
let | ||
version = "1.0.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "archtika"; | ||
repo = "archtika"; | ||
rev = "v${version}"; | ||
hash = "sha256-IDSh1YeQiVRdfY3pUM1RDXpZDT/7vXDx4EYH8gEmmj4="; | ||
}; | ||
|
||
web = buildNpmPackage { | ||
name = "web-app"; | ||
src = "${src}/web-app"; | ||
npmDepsHash = "sha256-RTyo7K/Hr1hBGtcBKynrziUInl91JqZl84NkJg16ufA="; | ||
npmFlags = [ "--legacy-peer-deps" ]; | ||
installPhase = '' | ||
mkdir -p $out/web-app | ||
cp package.json $out/web-app | ||
cp -r node_modules $out/web-app | ||
cp -r build/* $out/web-app | ||
cp -r template-styles $out/web-app | ||
''; | ||
}; | ||
|
||
api = stdenv.mkDerivation { | ||
name = "api"; | ||
src = "${src}/rest-api"; | ||
installPhase = '' | ||
mkdir -p $out/rest-api/db/migrations | ||
cp -r db/migrations/* $out/rest-api/db/migrations | ||
''; | ||
}; | ||
in | ||
symlinkJoin { | ||
pname = "archtika"; | ||
version = version; | ||
|
||
paths = [ | ||
web | ||
api | ||
]; | ||
|
||
meta = { | ||
description = "A modern, performant and lightweight CMS"; | ||
homepage = "https://archtika.com"; | ||
license = lib.licenses.gpl3; | ||
maintainers = [ lib.maintainers.thiloho ]; | ||
platforms = lib.platforms.unix; | ||
}; | ||
} |