Skip to content

Commit

Permalink
rework builds to use nix flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
oppiliappan committed Oct 1, 2021
1 parent 3bad67b commit 6b31fa5
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ build/
BitsNPicas.jar
.envrc
result
.direnv
46 changes: 0 additions & 46 deletions build.sh

This file was deleted.

44 changes: 44 additions & 0 deletions flake.lock

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

18 changes: 8 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,23 @@
overlay = final: prev: rec {

bitsnpicas = with final; pkgs.writeScriptBin "bitsnpicas" ''
${jdk}/bin/java -jar ${bitsnpicas-src}/downloads/BitsNPicas.jar
${jdk}/bin/java -jar ${bitsnpicas-src}/downloads/BitsNPicas.jar "$@"
'';

scientifica = with final; pkgs.stdenvNoCC.mkDerivation {
pname = "scientifica";
version = "v2.3";
src = ./.;
src = ./src;

buildPhase = ''
runHook preBuild
fontforge=${pkgs.fontforge}/bin/fontforge
bitsnpicas=${self.packages.bitsnpicas}/bin/bitsnpicas
ff_filter() {
fontforge -c 'open(argv[1]).generate(argv[2])' "$@"
${pkgs.fontforge}/bin/fontforge -c 'open(argv[1]).generate(argv[2])' "$@"
}
ttf_filter() {
bitsnpicas convertbitmap -f ttf -o "$2" "$1"
${pkgs.bitsnpicas}/bin/bitsnpicas convertbitmap -f ttf -o "$2" "$1"
}
mkdir -p $out/{ttf,otb,bdf}
Expand All @@ -68,14 +65,15 @@
ff_filter "$i" "$out/bdf/$file_name.bdf"
done
# copy ligature plugins
cp -r $src/ligature_plugins $out/ligature_plugins
popd
runHook postBuild
'';

installPhase = ''
true
'';

};

};
Expand Down
2 changes: 1 addition & 1 deletion ligature_plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mkdir -p ~/.vim/after/syntax
cp ligature_plugins/rust.vim ~/.vim/after/syntax/
```

If you have `set conceallevel=0` if your `vimrc`, remove it.
If you have `set conceallevel=0` in your `vimrc`, remove it.

Big thanks to [romeovs](https://github.com/romeovs/) for
creating the haskell plugin and the idea of ligatures via
Expand Down

0 comments on commit 6b31fa5

Please # to comment.