Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.
Merged
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
12 changes: 12 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,15 @@ jobs:
with:
file: "${{ github.workspace }}/out/rpm_package/*.rpm;${{ github.workspace }}/out/rpm_package/*.rpm.sha512"
tags: true

nix:
name: Build nix package
runs-on: ubuntu-22.04
needs: metadata
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Install Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v28
- name: Build
run: nix-build ${{ github.workspace }}/tools/nix -A filc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ filc
!include/*
!src/*
out
result
!bin/*
coverage.info
.idea
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION FILC_VERSION)
project(
filc
VERSION ${FILC_VERSION}
LANGUAGES C CXX
LANGUAGES CXX
)

include(FetchContent)
Expand Down
7 changes: 3 additions & 4 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
let
currentDir = builtins.toString ./.;
pnpm = pkgs.callPackage ./tools/nix/pnpm.nix { nodejs = pkgs.nodejs_20; };
cxxopts = pkgs.callPackage ./tools/nix/cxxopts.nix { };
antlr4 = pkgs.callPackage ./tools/nix/antlr4.nix { };
cxxopts = pkgs.cxxopts.override { enableUnicodeHelp = false; };
in

pkgs.mkShell {
Expand All @@ -27,8 +26,8 @@ pkgs.mkShell {
pkgs.libffi
pkgs.libxml2
cxxopts
antlr4.antlr
antlr4.runtime.cpp
pkgs.antlr4_13
pkgs.antlr4_13.runtime.cpp
];

shellHook = ''
Expand Down
78 changes: 0 additions & 78 deletions tools/nix/antlr4.nix

This file was deleted.

33 changes: 0 additions & 33 deletions tools/nix/cxxopts.nix

This file was deleted.

5 changes: 5 additions & 0 deletions tools/nix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
let
pkgs = import ./pin-nixpkgs.nix { };
in {
filc = pkgs.callPackage ./filc.nix { };
}
28 changes: 28 additions & 0 deletions tools/nix/filc.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ stdenvNoCC
, fetchFromGitHub
, cmake
, ninja
, clang
, cxxopts
, antlr4_13
, llvmPackages_18
}:

let
cxxopts_filc = cxxopts.override { enableUnicodeHelp = false; };
in

stdenvNoCC.mkDerivation rec {
pname = "filc";
version = "0.1.0";

src = fetchFromGitHub {
owner = "Fil-Language";
repo = "filc";
rev = "v${version}";
hash = "sha256-MB6ABwxVYdJ4YxLHKNvDLrFUN6M/u2/vk1+x3rjktPU=";
};

nativeBuildInputs = [ cmake ninja clang ];
buildInputs = [ cxxopts_filc antlr4_13 antlr4_13.runtime.cpp llvmPackages_18.libllvm ];
}