Skip to content

Commit

Permalink
Merge pull request #25 from w0rm/nix
Browse files Browse the repository at this point in the history
Add nix shell
  • Loading branch information
w0rm authored Nov 11, 2023
2 parents 20cedc2 + 3402640 commit f28d3d6
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 1 deletion.
60 changes: 60 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = with pkgs; with elmPackages; mkShell {
buildInputs = [
elm
elm-format
elm-test
elm-review
nodePackages.uglify-js
butler
ghostscript # for generating ball textures
pngquant # for minimizing ball textures
];
};
});
}
2 changes: 1 addition & 1 deletion scripts/textures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ EOF
echo "$PS_CODE" \
| sed "s/$${background}/$background/g;s/$${stripe}/$stripe/g;s/$${number}/$number/g;" \
| gs -I$SCRIPTPATH/font -dSAFER -dQUIET -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -sOutputFile=- -\
| pngquant --force --strip --speed=1 8 --output $SCRIPTPATH/../src/img/balls/$number.png -
| pngquant --force --strip --speed=1 8 --output $SCRIPTPATH/../public/img/balls/$number.png -
}

texture "1 0.843 0" "1 0.843 0" 1 # yellow
Expand Down

0 comments on commit f28d3d6

Please sign in to comment.