Skip to content

Commit

Permalink
add darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
dpolakovics committed Oct 3, 2023
1 parent b7710c0 commit 274b401
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
with import <nixpkgs> {};
let
nix_pkgs_with_hugo_106 = import (builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "nix_pkgs_with_singularity";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixos-22.11";
rev = "6adf48f53d819a7b6e15672817fa1e78e5f4e84f";
# Descriptive name to make the store path easier to identify
name = "nix_pkgs_with_singularity";
url = "https://github.com/NixOS/nixpkgs/";
ref = "refs/heads/nixos-22.11";
rev = "6adf48f53d819a7b6e15672817fa1e78e5f4e84f";
}) {};

os = if pkgs.system == "x86_64-darwin"
then "darwin"
else "linux";
in stdenv.mkDerivation {
name = "node";
buildInputs = [
Expand All @@ -16,13 +20,13 @@ in stdenv.mkDerivation {
];
shellHook = ''
export PATH="$PWD/node_modules/.bin/:$PATH"
mkdir -p $PWD/node_modules/.bin/hugo
mkdir -p $PWD/node_modules/.bin/hugo
ln -s ${nix_pkgs_with_hugo_106.hugo}/bin/hugo $PWD/node_modules/.bin/hugo/hugo
cat <<EOT > $PWD/node_modules/.bin/hugo/version.json
{
"arch": "x64",
"extended": true,
"os": "linux",
"os": "${os}",
"version": "0.106.0"
}
EOT
Expand Down

0 comments on commit 274b401

Please sign in to comment.