Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homer: init 24.11.1 #354293

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions pkgs/by-name/ho/homer/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
lib,
fetchFromGitHub,
pnpm,
nodejs,
pkgs,
}:
pkgs.stdenv.mkDerivation rec {
pname = "homer";
version = "24.11.1";
src = fetchFromGitHub {
owner = "bastienwirtz";
repo = "homer";
rev = "v${version}";
hash = "sha256-a2t8qd/yxk7R0zyhQo0zoSIkfzfvBIrzNclNsD5GxRw=";
};

pnpmDeps = pnpm.fetchDeps {
inherit
pname
version
src
patches
;
hash = "sha256-5unoY8lPaX9sZAJEBICpxSddwLV8liK1tbaaB2ulvew=";
};

patches = [ ./sass-embedded.patch ];

nativeBuildInputs = with pkgs; [
nodejs
dart-sass
pnpm.configHook
];

buildPhase = ''
runHook preBuild

export SASS_EMBEDDED_BIN_PATH="${pkgs.dart-sass}/bin/sass"
pnpm build

runHook postBuild
'';

installPhase = ''
runHook preInstall

mkdir -p $out
cp -R dist/* $out/

runHook postInstall
'';

meta = with lib; {
description = "A very simple static homepage for your server.";
homepage = "https://homer-demo.netlify.app/";
changelog = "https://github.com/bastienwirtz/homer/releases";
license = licenses.asl20;
maintainers = with maintainers; [ stunymonkey ];
platforms = platforms.all;
};
}
133 changes: 133 additions & 0 deletions pkgs/by-name/ho/homer/sass-embedded.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
diff --git a/package.json b/package.json
index f121431..97f1b11 100644
--- a/package.json
+++ b/package.json
@@ -28,5 +28,10 @@
"vite-plugin-pwa": "^0.20.5"
},
"license": "Apache-2.0",
- "packageManager": "[email protected]+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4"
+ "packageManager": "[email protected]+sha512.e5a7e52a4183a02d5931057f7a0dbff9d5e9ce3161e33fa68ae392125b79282a8a8a470a51dfc8a0ed86221442eb2fb57019b0990ed24fab519bf0e1bc5ccfc4",
+ "pnpm": {
+ "patchedDependencies": {
+ "sass-embedded": "patches/sass-embedded.patch"
+ }
+ }
}
diff --git a/patches/sass-embedded.patch b/patches/sass-embedded.patch
new file mode 100644
index 0000000..f941a8e
--- /dev/null
+++ b/patches/sass-embedded.patch
@@ -0,0 +1,15 @@
+diff --git a/dist/lib/src/compiler-path.js b/dist/lib/src/compiler-path.js
+index ae33aa3028e1a120d9e84b043bb19a71f1083b96..7a49d16a54982312ad638632d6750d7bec670f02 100644
+--- a/dist/lib/src/compiler-path.js
++++ b/dist/lib/src/compiler-path.js
+@@ -24,6 +24,10 @@ function isLinuxMusl(path) {
+ }
+ /** The full command for the embedded compiler executable. */
+ exports.compilerCommand = (() => {
++ const binPath = process.env.SASS_EMBEDDED_BIN_PATH;
++ if (binPath) {
++ return [binPath];
++ }
+ const platform = process.platform === 'linux' && isLinuxMusl(process.execPath)
+ ? 'linux-musl'
+ : process.platform;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4c4267a..fd278e1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -4,6 +4,11 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false

+patchedDependencies:
+ sass-embedded:
+ hash: 6wjvcsryx2tfkpottp4wf5nbzi
+ path: patches/sass-embedded.patch
+
importers:

.:
@@ -26,7 +31,7 @@ importers:
devDependencies:
'@vitejs/plugin-vue':
specifier: ^5.1.4
- version: 5.1.4([email protected]([email protected])([email protected])([email protected]))([email protected])
+ version: 5.1.4([email protected]([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected]))([email protected])
'@vue/eslint-config-prettier':
specifier: ^10.0.0
version: 10.0.0([email protected])([email protected])
@@ -44,13 +49,13 @@ importers:
version: 3.3.3
sass-embedded:
specifier: ^1.79.5
- version: 1.79.5
+ version: 1.79.5(patch_hash=6wjvcsryx2tfkpottp4wf5nbzi)
vite:
specifier: ^5.4.9
- version: 5.4.9([email protected])([email protected])([email protected])
+ version: 5.4.9([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected])
vite-plugin-pwa:
specifier: ^0.20.5
- version: 0.20.5([email protected]([email protected])([email protected])([email protected]))([email protected])([email protected])
+ version: 0.20.5([email protected]([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected]))([email protected])([email protected])

packages:

@@ -3516,9 +3521,9 @@ snapshots:

'@types/[email protected]': {}

- '@vitejs/[email protected]([email protected]([email protected])([email protected])([email protected]))([email protected])':
+ '@vitejs/[email protected]([email protected]([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected]))([email protected])':
dependencies:
- vite: 5.4.9([email protected])([email protected])([email protected])
+ vite: 5.4.9([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected])
vue: 3.5.12

'@vue/[email protected]':
@@ -4693,7 +4698,7 @@ snapshots:
[email protected]:
optional: true

- [email protected]:
+ [email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi):
dependencies:
'@bufbuild/protobuf': 2.2.0
buffer-builder: 0.2.0
@@ -4975,18 +4980,18 @@ snapshots:

[email protected]: {}

- [email protected]([email protected]([email protected])([email protected])([email protected]))([email protected])([email protected]):
+ [email protected]([email protected]([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected]))([email protected])([email protected]):
dependencies:
debug: 4.3.7
pretty-bytes: 6.1.1
tinyglobby: 0.2.9
- vite: 5.4.9([email protected])([email protected])([email protected])
+ vite: 5.4.9([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected])
workbox-build: 7.1.0
workbox-window: 7.1.0
transitivePeerDependencies:
- supports-color

- [email protected]([email protected])([email protected])([email protected]):
+ [email protected]([email protected](patch_hash=6wjvcsryx2tfkpottp4wf5nbzi))([email protected])([email protected]):
dependencies:
esbuild: 0.21.5
postcss: 8.4.47
@@ -4994,7 +4999,7 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
sass: 1.79.5
- sass-embedded: 1.79.5
+ sass-embedded: 1.79.5(patch_hash=6wjvcsryx2tfkpottp4wf5nbzi)
terser: 5.35.0

[email protected]([email protected]):
--
2.47.0