Skip to content

Commit

Permalink
Migrate to flake
Browse files Browse the repository at this point in the history
  • Loading branch information
siraben committed May 23, 2024
1 parent a1485a5 commit 6a8f8b8
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 230 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
18 changes: 8 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@ on:
pull_request:
push:
jobs:
tests:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.1
- uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix build
- uses: actions/checkout@v4.1.6
- uses: cachix/install-nix-action@v15
- run: nix --experimental-features 'nix-command flakes' build -L
- name: "Copy ti84-forth"
run: "mkdir ti84-forth && cp -r result/* ti84-forth && chmod +w -R ti84-forth"
run: cp result/forth.8xp .
- name: "Upload artifact to github"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.3.3
with:
name: ti84-forth
path: ti84-forth
name: forth.8xp
path: forth.8xp
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
*.8xp
result
23 changes: 0 additions & 23 deletions default.nix

This file was deleted.

61 changes: 61 additions & 0 deletions flake.lock

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

27 changes: 27 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
description = "A Forth interpreter for the TI-84 Plus calculators";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
with import nixpkgs { inherit system; }; {
defaultPackage = stdenv.mkDerivation {
pname = "ti84-forth";
version = "head";
src = ./.;
nativeBuildInputs = [ spasm-ng ];
buildPhase = ''
spasm forth.asm forth.8xp
'';

installPhase = ''
mkdir -p $out
mv forth.8xp $out/
'';
};
}
);
}
26 changes: 0 additions & 26 deletions nix/sources.json

This file was deleted.

171 changes: 0 additions & 171 deletions nix/sources.nix

This file was deleted.

0 comments on commit 6a8f8b8

Please sign in to comment.