Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhvath28 committed Sep 2, 2024
1 parent 7379be7 commit 585b0a0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 42 deletions.
46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
# crystal2nix
crystal2nix is a streamlined tool designed to simplify the integration of Crystal projects with the Nix package manage, it supports seamless builds from both Git and Mercurial repositories.
[<img src="https://nixos.org/logo/nixos-logo-only-hires.png" width="200" align="right" alt="NixOS">](https://nixos.org)

`crystal2nix`
# Crystal2Nix

Crystal2Nix is a tool designed to generate Nix expressions for Crystal projects. It simplifies the process of managing dependencies and building Crystal applications within the Nix ecosystem.

## Features

- Automatically generates Nix expressions from `shard.yml` files.
- Supports Crystal projects with various dependencies.
- Building and managing Crystal applications.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Testing](#testing)
- [Contributing](#contributing)
- [License](#license)

## Installation

### Prerequisites

- [Nix](https://nixos.org/download.html) installed on your system.
- [Crystal](https://crystal-lang.org/install/) programming language installed.

## Installation

Expand All @@ -17,22 +39,15 @@ To generate a Nix expression for your Crystal project, simply run:

## Testing

crystal2nix includes various test cases to ensure the reliability and functionality of the tool. These are categorized into offline unit tests.

Offline Unit Tests: These tests can be run within the Nix sandbox without requiring network connectivity.

`make check`

Helps you test offline test cases.
Unit Tests: These tests can be run within the Nix sandbox without requiring network connectivity.

## Development

We welcome all contributions, whether it's bug fixes, new features, or documentation improvements. If you're interested in contributing to crystal2nix, here's how you can get started:
`make check ` # Runs unit tests

## Future plans

Support for Fossil resources: Expanding source control compatibility.
Enhanced Test Suite: Adding more integration test cases to further solidify the reliability of crystal2nix.
Additional integration test cases: Enhancing the robustness of our test suite.


## Contributing

Expand All @@ -50,7 +65,6 @@ crystal2nix is licensed under the MIT License. You are free to use, modify, and

## Contributors


- [Michael Fellinger](https://github.com/manveru)
- [Peter Hoeg](https://github.com/peterhoeg)
- [Vidhvath J](https://github.com/vidhvath28)
- [Vidhvath J](https://github.com/vidhvath28)
26 changes: 0 additions & 26 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
require "../src/crystal2nix"
require "spectator"

module SpecHelper
def self.setup_temp_directory(dir)
Dir.mkdir(dir) unless Dir.exists?(dir)
end

def self.cleanup_file(file_path)
File.delete(file_path) if File.exists?(file_path)
end

def self.write_file(file_path, content)
File.write(file_path, content)
end

def self.read_file(file_path)
File.read(file_path)
end

def self.file_exists?(file_path)
File.exists?(file_path)
end

def self.prepare_for_test(generated_shards_nix)
setup_temp_directory("spec/tmp")
cleanup_file(generated_shards_nix)
end
end

0 comments on commit 585b0a0

Please sign in to comment.